Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

watchmedo not using ignore patterns #326

Closed
mccarthyryanc opened this issue Jun 26, 2015 · 5 comments
Closed

watchmedo not using ignore patterns #326

mccarthyryanc opened this issue Jun 26, 2015 · 5 comments

Comments

@mccarthyryanc
Copy link

I am using rsync to download many files to a directory like so:

rsync /src/directory/*.txt /download/dir/ 

And then, using watchmedo to run a command on each new text file:

watchmedo shell-command -i '.*' -p '*.txt' -c 'file "${watch_src_path}"' /download/dir/

The problem is that watchmedo isn't catching the ignore patters and running the command on the temp files created by rsync:

/download/dir/.dl_file.txt.ytfRRs: ERROR: cannot open `/download/dir/.dl_file.txt.ytfRRs' (No such file or directory)

System Specs
Ubuntu 14.04
python 2.7.6
watchmedo 0.8.3

@mosdevly
Copy link

Having the same problem. It'a monitoring .git files/folders. Using ignore_pattern and/or ignore_directories on the handlers is having zero effect.

OSX, python 2.7

@sknebel
Copy link

sknebel commented Apr 16, 2016

Seems to be an issue on all platforms:
watchdog 0.8.3, Python 3.5, Windows 7, same thing

@Asday
Copy link

Asday commented Apr 1, 2018

Still happening 2 years layer, watchdog 0.8.3, still.

Is this project dead?

@ramblehead
Copy link

watchmedo matches the full watch_src_path. For example:

watchmedo shell-command --ignore-directories --recursive \
          --patterns="*.xml" \
          --ignore-patterns="*/.#*.xml" \
          --command='echo "${watch_src_path} - ${watch_event_type}"' .

The above script would recursively watch all xml files in the present working directory ignoring temporary xml files which some text editors (e.g. emacs) might create.

P. S. Open Source projects do not die - they are are immortal :)

@luzpaz
Copy link

luzpaz commented Oct 13, 2019

watchmedo matches the full watch_src_path.

Looks like it's related to #335

@BoboTiG BoboTiG closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants