Real fix for #148

This commit is contained in:
mail6543210
2017-09-19 20:30:15 +08:00
committed by Jeremy Cook
parent 3b633ed326
commit 35e1909790

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