-
Notifications
You must be signed in to change notification settings - Fork 37
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
Cannot handle directories with colons in their name #59
Comments
Correction: this only applies to directories with colons in their name, since the watcher only reports the directory name. Issue title fixed. Example traceback (using the
This is using the sample program: require 'listen'
listener = Listen.to('/tmp/foo:bar') do |modified, added, removed|
puts "modified absolute path: #{modified}"
puts "added absolute path: #{added}"
puts "removed absolute path: #{removed}"
end
listener.start # not blocking
sleep and touching files inside |
Have the same error, with Jekyll. Error happens after I save a file in mode |
yeah... this is super shitty. i'm closing all open bugs because ...however, |
this should be fixed in |
fixed in 0.10.0 and 0.10.1 |
Due to using colon as a delimiter,
rb-fsevent
cannot correctly report events on files that have actual colons in their names. This came up with myjekyll
blog, whereby I had a topic tag with a colon in it.The effects are broader: since the colon causes it to suddenly receive a non-absolute path (e.g.
/tmp/foo:bar
gets turned into/tmp/foo
andbar
), this also breaks gems likelisten
that expect to always receive an absolute path, and crash (due to Pathnamerelative_path_from
attempts) when they get a relative path.The simplest solution would probably be to either use NULs (
\0
) as the delimiter character, or if that's not possible, to implement very basic backslash escaping (:
→\:
,\
→\\
).The text was updated successfully, but these errors were encountered: