summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tool/lib/output.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/tool/lib/output.rb b/tool/lib/output.rb
index b1c4f4a866..a7faa44810 100644
--- a/tool/lib/output.rb
+++ b/tool/lib/output.rb
@@ -28,8 +28,11 @@ class Output
updated = color.fail("updated")
outpath = nil
- if (@ifchange or overwrite or create_only) and
- (@vpath.open(@path, "rb") {|f| outpath = f.path; (@ifchange and f.read == data) or (create_only and !f.read.empty?)} rescue false)
+ 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?)
+ } rescue false)
puts "#{outpath} #{unchanged}"
written = false
else