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
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
Seems to be an issue on all platforms:
watchdog 0.8.3, Python 3.5, Windows 7, same thing
Still happening 2 years layer, watchdog 0.8.3, still.
Is this project dead?
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 :)
watchmedo matches the full watch_src_path.
Looks like it's related to #335
Most helpful comment
watchmedo
matches the fullwatch_src_path
. For example: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 :)