sshync
sshync copied to clipboard
sync not triggered in filechanges in subdirectories
With the following folder structure
├── package.json
└─┬ lib/
└── index.js
When modifying lib/index.js, nothing happens in sshync.
When modifying package.json, both files are synced.
Since both files are synced when I modify index.js I assume it is fs.watch that doesn't catch the recursive files (although it is set to do so in the latest version?)
Using version 1.1.1 and tested with node v0.10.46, v4.4.7, and v6.3.0
Hey, @MiniGod. Thank you for reporting the issue.
In certain environments fs.watch can be problematic, see https://nodejs.org/docs/latest/api/fs.html#fs_caveats
I will look this up and maybe switch to something more stable when I have time.
This occurred on Ubuntu 12.04. I have not tested this on other distros or OSes.
Looking forward to a potential fix!
FYI, I'm not using this module any more, but stole the rsync command from this module (thanks!).
I do this now with nodemon:
# nodemon -x rsync -- -avuz --exclude .git --exclude-from .gitignore <source> <dest>
# example:
nodemon -x rsync -- -avuz --exclude .git --exclude-from .gitignore ./ [email protected]:/user/ubuntu/some_project/