Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Skipping dot files #14

Closed
roktas opened this issue Dec 17, 2021 · 6 comments · Fixed by #17
Closed

Skipping dot files #14

roktas opened this issue Dec 17, 2021 · 6 comments · Fixed by #17
Assignees
Milestone

Comments

@roktas
Copy link

roktas commented Dec 17, 2021

Hi,

First of all, thanks for this little tool, much appreciated.

I have a few ignore patterns for some dot files in Dropbox (i.e. .vagrant directories), but Dropignore seems to skip those patterns. Am I missing something? Is there any reason for this behaviour? Could it at least be an opt-out behaviour?

@mweirauch
Copy link
Owner

Hi!

First and foremost thanks!

I guess this is an oversight. The intention actually was to skip "." and ".." on scan if I remember correctly. And as I didn't have the need to ignore any dot-files personally, this just slipped through.

I will have a look.

@mweirauch mweirauch self-assigned this Dec 17, 2021
@mweirauch mweirauch added the bug Something isn't working label Dec 17, 2021
@mweirauch mweirauch added this to the 0.1.1 milestone Dec 17, 2021
@roktas
Copy link
Author

roktas commented Dec 17, 2021

Thanks for the quick reply!

FWIW, here is the systemd service file I'm using. It works great so far.

# Install dropignore to ~/.local/bin and, copy this file as ~/.config/systemd/user/dropignore.service
# (The location of Dropbox folder is ~/Dropbox, change it if necessary)
#
# Enable service:
#   systemctl --user daemon-reload
#   systemctl enable --now --user dropignore.service
#
# Make sure it works:
#   journalctl --user-unit=dropignore --follow

[Unit]
Description=Watch Dropbox folder for ignored paths
ConditionPathIsDirectory=%h/Dropbox
ConditionFileIsExecutable=%h/.local/bin/dropignore

[Service]
ExecStart=%h/.local/bin/dropignore watch %h/Dropbox
Restart=on-failure

[Install]
WantedBy=graphical.target

@mweirauch
Copy link
Owner

Of course my memory was wrong. The skip was not related to "." and ".." but actually to skip any possible VCS directories. It doesn't make sense to traverse e.g. ".git", ".svn", ".hg" and so on. And for not having to hardcode a list of "known VCS directories" - which might not be complete - that was the solution. I will likely change it to actually handle these filesystem entries with regard to evalution for ignoring or skipping but will try to not have them traversed/recursed any further.

Some dependency updates and stable rust fixes have to be done first. Might take a bit due to limited time.

And thanks for the systemd setup! I am running something similar for around 1.5 years without issues but never came around to document it. I will likely take a combination of yours and mine.

@roktas
Copy link
Author

roktas commented Dec 18, 2021

It doesn't make sense to traverse e.g. ".git", ".svn", ".hg" and so on.

Ah, now I see. It makes sense. Almost all of my Git repositories are in Dropbox for years and, I've never ignored any of them. Only problem is node_modules like packaging cruft, which your tool aimed to fix. BTW, your decision to centralize the configuration is also right. I wouldn't prefer to see extra .dropignore files scattered around. Ignoring files for a VCS is a dfiferent problem than ignoring files to sync for Dropbox. Extra 👍 for the proper design.

Might take a bit due to limited time.

No problem. Dot files are rare in my workflow (just the host dependent .vagrant directory, for now), I can wait.

mweirauch added a commit that referenced this issue Dec 20, 2021
Dot-directories will not be recursed into any further, though.

Fixes #14.
@mweirauch mweirauch added enhancement New feature or request and removed bug Something isn't working labels Dec 20, 2021
mweirauch added a commit that referenced this issue Dec 22, 2021
Dot-directories will not be recursed into any further, though.

Fixes #14.
mweirauch added a commit that referenced this issue Dec 22, 2021
Dot-directories will not be recursed into any further, though.

Fixes #14.
@mweirauch mweirauch removed the enhancement New feature or request label Dec 22, 2021
@mweirauch
Copy link
Owner

Release 0.1.1 is out. Hope I didn't miss something during my testing.

@roktas
Copy link
Author

roktas commented Dec 29, 2021

Release 0.1.1 is out. Hope I didn't miss something during my testing.

Sorry for the late reply. Everything is fine on my side. Thanks for your efforts.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants