lib/overapp/files.rb in overapp-0.2.0 vs lib/overapp/files.rb in overapp-0.3.0
- old
+ new
@@ -14,10 +14,13 @@
res = files.clone
on_top.each do |top_file|
existing = res.find { |x| x.path == top_file.path }
if existing
res -= [existing]
- res << top_file.combined(existing)
+ new_file = top_file.combined(existing)
+ res << new_file if new_file
+ elsif top_file.has_note?
+ raise "cannot overlay onto missing file #{top_file.path}"
else
res << top_file
end
end
self.class.new(:files => res)
\ No newline at end of file