5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-03 13:26:07 +00:00

no vincular si el archivo ya existe #213

por ejemplo git lfs rompe los links duros
This commit is contained in:
f 2021-02-24 17:40:27 -03:00
parent 0ee6d5a2ab
commit dce75d6d6c

View file

@ -125,7 +125,8 @@ class MetadataFile < MetadataTemplate
#
# @return [Boolean]
def hardlink
return true if hardlink?
return if hardlink?
return if File.exist? destination_path
FileUtils.mkdir_p(File.dirname(destination_path))
FileUtils.ln(uploaded_path, destination_path).zero?