You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FSSM.monitor do
path Dir.tmpdir do
create do |base, relative|
p "#{base}/#{relative}"
end
update do |base, relative|
p "#{base}/#{relative}"
end
delete do |base, relative|
p "#{base}/#{relative}"
end
end
end
testb.rb:
require 'tmpdir'
path = "#{Dir.tmpdir}/fssmsymlinktest"
File.open(path, 'w') do |w|
w.write("fssm is about to output a bad path")
end
sleep 2
File.delete(path)
The text was updated successfully, but these errors were encountered:
the issue exists in both the rubycocoa fsevent backend and rb-fsevent, so it looks like resolving full paths is just something that fsevent does for you if you want it to or not. to work around this i'm resolving the path you pass in to monitor.path so that the structure in the cache matches what fsevent will eventually give to you, but i'm wondering if there will be further issues with symlinks under the path you initially watch as well. fun times.
I ran into this while trying to watch a subdirectory of /var on Mac OS X where /var is a link to private/var.
Run testa.rb and then testb.rb(without stopping testa) and you'll get a bunch of paths printed out that don't actually exist on the filesystem.
testa.rb:
require 'rubygems'
require 'fssm'
require 'tmpdir'
testb.rb:
require 'tmpdir'
The text was updated successfully, but these errors were encountered: