Skip to content

fix the listen watcher #313

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

Merged
merged 2 commits into from
Jun 16, 2014
Merged

Conversation

rubemz
Copy link
Contributor

@rubemz rubemz commented Jun 13, 2014

Fix the listen watcher listening directories with a path that starts with the same substring than the root path. Before this fix, if a given directory had a path that starts equal to the root path, it would discard it thinking it would be a root subdirectory.

For example, the root path is a Rails app at ~/source/app and I also wanted to listen changes in another directory (that is a dependency) located at ~/source/app_core.

However, the listen watcher wasn't listening the ~/source/app_core because this logic checks if a given directory matches the beginning of the root path and not listening that.

This PR fixes it by correctly checking if a given directory is a subdirectory of the root directory and avoiding mistakes as described before.

jonleighton added a commit that referenced this pull request Jun 16, 2014
@jonleighton jonleighton merged commit 37ba942 into rails:master Jun 16, 2014
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

Successfully merging this pull request may close these issues.

2 participants