Skip calling f.read for overwrite: true
-only cases
We only need to set outpath for that case.
This commit is contained in:
parent
5ba9dcff16
commit
3262842e0a
@ -30,8 +30,10 @@ class Output
|
||||
|
||||
if (@ifchange or overwrite or create_only) and (@vpath.open(@path, "rb") {|f|
|
||||
outpath = f.path
|
||||
original = f.read
|
||||
(@ifchange and original == data) or (create_only and !original.empty?)
|
||||
if @ifchange or create_only
|
||||
original = f.read
|
||||
(@ifchange and original == data) or (create_only and !original.empty?)
|
||||
end
|
||||
} rescue false)
|
||||
puts "#{outpath} #{unchanged}"
|
||||
written = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user