Fixing diff problems by providing source block and checking for

directories in diff
This commit is contained in:
Jeremy Cook
2015-02-24 21:04:21 -05:00
committed by Jeremy Cook
parent 42f661cfbf
commit 978416d1e4
3 changed files with 7 additions and 4 deletions

View File

@@ -148,8 +148,8 @@ module Homesick
first_p.mtime > second_p.mtime && !first_p.symlink?
end
def collision_accepted?(destination)
fail "Argument must be an instance of Pathname, #{destination.class.name} given" unless destination.instance_of?(Pathname)
def collision_accepted?(destination, source)
fail "Arguments must be instances of Pathname, #{destination.class.name} and #{source.class.name} given" unless destination.instance_of?(Pathname) && source.instance_of?(Pathname)
options[:force] || shell.file_collision(destination) { source }
end