Method: File.safe_link

Defined in:
lib/sup/util.rb

platform safe file.link which attempts a copy if hard-linking fails



51
52
53
54
55
56
57
# File 'lib/sup/util.rb', line 51

def self.safe_link src, dest
  begin
    File.link src, dest
  rescue
    FileUtils.copy src, dest
  end
end