diff --git a/lib/listen/directory_record.rb b/lib/listen/directory_record.rb index 63a46a3c..79f2eb68 100644 --- a/lib/listen/directory_record.rb +++ b/lib/listen/directory_record.rb @@ -18,7 +18,11 @@ class DirectoryRecord # Defines the used precision based on the type of mtime returned by the # system (whether its in milliseconds or just seconds) # - HIGH_PRECISION_SUPPORTED = File.mtime(__FILE__).to_f.to_s[-2..-1] != '.0' + begin + HIGH_PRECISION_SUPPORTED = File.mtime(__FILE__).to_f.to_s[-2..-1] != '.0' + rescue + HIGH_PRECISION_SUPPORTED = false + end # Data structure used to save meta data about a path #