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

fswatch isn't following symbolic links #87

Closed
seaside98 opened this issue Jul 10, 2015 · 5 comments
Closed

fswatch isn't following symbolic links #87

seaside98 opened this issue Jul 10, 2015 · 5 comments

Comments

@seaside98
Copy link

Fswatch does not follow symbolic links to watch events within the symbolic link. I am running

fswatch -Lr /dir/with/symb/inside

I have also tried --follow-links, with no results. Hopefully this isn't just an issue with me.

OSX yosemite
fswatch 1.4.7

@emcrisostomo
Copy link
Owner

I just tried to replicate your issues but I don't find any problem:

% fswatch --version
fswatch 1.4.7
...
% mkdir ${HOME}/temp
% ln -s ${HOME}/temp ${HOME}/mylink
% fswatch -Lr ${HOME}/mylink

From another terminal:

% touch ${HOME}/mylink/test.txt

and fswatch outputs (${HOME} is a placeholder):

${HOME}/temp/test.txt Created IsFile

Could you confirm you are affected by this problem?

@seaside98
Copy link
Author

Perhaps I am using it wrong, is there not support for nested symbolic links?

% ln -s ${HOME}/temp ${HOME}/folder/mylink 
% fswatch -Lr ${HOME}/folder

On Jul 19, 2015, at 7:21 AM, Enrico Maria Crisostomo [email protected] wrote:

I just tried to replicate your issues but I don't find any problem:

% fswatch --version
fswatch 1.4.7
...
% mkdir ${HOME}/temp
% ln -s ${HOME}/temp ${HOME}/mylink
% fswatch -Lr ${HOME}/mylink
From another terminal:

% touch ${HOME}/mylink/test.txt
and fswatch outputs (${HOME} is a placeholder):

${HOME}/temp/two.txt Created IsFile
Could you confirm you are affected by this problem?


Reply to this email directly or view it on GitHub.

@emcrisostomo
Copy link
Owner

Symlink resolution is guaranteed when parsing command line arguments but then each monitor has its own characteristics. You are running fswatch on OS X and I assume you are using the FSEvents monitor: in this case, the -L option has no effect since the FSEvents API does not offer this behaviour.

Monitors using other APIs, such as kqueue and inotify, have to scan the file system anyway and adding this behaviour was straightforward.

@seaside98
Copy link
Author

Ah, that explains it. Thank you very much!

On Jul 19, 2015, at 11:16 AM, Enrico Maria Crisostomo [email protected] wrote:

Symlink resolution is guaranteed when parsing command line arguments but then each monitor has its own characteristics. You are running fswatch on OS X and I assume you are using the FSEvents monitor: in this case, the -L option has no effect since the FSEvents API does not offer this behaviour.

Monitors using other APIs, such as kqueue and inotify, have to scan the file system anyway and adding this behaviour was straightforward.


Reply to this email directly or view it on GitHub #87 (comment).

@emcrisostomo
Copy link
Owner

You're welcome @seaside98

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

2 participants