Real fix for #148

This commit is contained in:
mail6543210
2017-09-19 20:30:15 +08:00
parent d3d6974b7b
commit 62c934774b

View File

@@ -31,7 +31,7 @@ module Homesick
destination = Pathname.new(destination) destination = Pathname.new(destination)
source = Pathname.new(source) source = Pathname.new(source)
return 'Unable to create diff: destination or content is a directory' if destination.directory? || source.directory? return 'Unable to create diff: destination or content is a directory' if destination.directory? || source.directory?
return super(destination, source) unless destination.symlink? return super(destination, File.binread(source)) unless destination.symlink?
say "- #{destination.readlink}", :red, true say "- #{destination.readlink}", :red, true
say "+ #{source.expand_path}", :green, true say "+ #{source.expand_path}", :green, true
end end