ttilley/fssm — Issue #32: FSSM Crashes for filename changes
Author: zauberexonar
Created: 2011-10-21 21:39:56+00:00
State: open

I had written a script to monitor a directory of SVG images I had created, and to auto-convert them to PNG files (stored in another directory) whenever I saved the SVG files. I was working on upgrading the script so that it could handle variable DPI values, but ran into a problem: renaming a file while the script is running will cause it to crash.

This is the error output that was given on the command line:

/usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/path.rb:45:in `block in init_callbacks': delete - //home/zauber/TheLordsOfMaelstrom/COMIC/VECTORS/Yggath.svg: wrong number of arguments (3 for 2) (FSSM::CallbackError)
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/path.rb:73:in `call'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/path.rb:73:in `run_callback'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/path.rb:55:in `callback_action'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/path.rb:39:in `delete'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/state/directory.rb:32:in `block in deleted'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/state/directory.rb:31:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/state/directory.rb:31:in `deleted'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/state/directory.rb:16:in `refresh'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/backends/inotify.rb:12:in `block in add_handler'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:200:in `call'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:200:in `block in watch'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/watcher.rb:41:in `[]'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/watcher.rb:41:in `callback!'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/event.rb:128:in `callback!'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:233:in `block in process'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:233:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:233:in `process'
from /usr/lib/ruby/gems/1.9.1/gems/rb-inotify-0.8.8/lib/rb-inotify/notifier.rb:216:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/backends/inotify.rb:20:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm/monitor.rb:26:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/fssm-0.2.7/lib/fssm.rb:20:in `monitor'
from SVG_Monitor_NEW.rb:54:in `

'