Fix make_relative_symlink when names differ
Before we would always make the symlink itself have a basename the same as what it pointed to. I don’t think this breaks any of the other usages as they were working by coincidence.
This commit is contained in:
parent
153c1c759b
commit
527c841f1c
@ -230,7 +230,7 @@ class Pathname
|
|||||||
Dir.chdir self.dirname do
|
Dir.chdir self.dirname do
|
||||||
# TODO use Ruby function so we get exceptions
|
# TODO use Ruby function so we get exceptions
|
||||||
# NOTE Ruby functions may work, but I had a lot of problems
|
# NOTE Ruby functions may work, but I had a lot of problems
|
||||||
rv = system 'ln', '-sf', src.relative_path_from(self.dirname)
|
rv = system 'ln', '-sf', src.relative_path_from(self.dirname), self.basename
|
||||||
unless rv and $? == 0
|
unless rv and $? == 0
|
||||||
raise <<-EOS.undent
|
raise <<-EOS.undent
|
||||||
Could not create symlink #{to_s}.
|
Could not create symlink #{to_s}.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user