Fix bug #15: Errno:EACCES on Windows when trying to compile identical file (on watch)
Per https://prototype.lighthouseapp.com/projects/8888/tickets/16-permission-denied-building-via-sprockets-on-windows you can't do File.utime on an open file in Windows. Changed the reading of the existing file to IO.read() which will close the file on completion of the read.
This commit is contained in:
parent
ab4ae91f38
commit
ebfa4709b1
@ -33,7 +33,7 @@ module Compass
|
||||
options ||= self.options if self.respond_to?(:options)
|
||||
skip_write = options[:dry_run]
|
||||
if File.exists?(file_name)
|
||||
existing_contents = File.new(file_name).read
|
||||
existing_contents = IO.read(file_name)
|
||||
if existing_contents == contents
|
||||
logger.record :identical, basename(file_name)
|
||||
skip_write = true
|
||||
@ -105,4 +105,4 @@ module Compass
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user