mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-20 04:03:38 +00:00
no vincular si el archivo ya existe #213
por ejemplo git lfs rompe los links duros
This commit is contained in:
parent
0ee6d5a2ab
commit
dce75d6d6c
1 changed files with 2 additions and 1 deletions
|
@ -125,7 +125,8 @@ class MetadataFile < MetadataTemplate
|
||||||
#
|
#
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
def hardlink
|
def hardlink
|
||||||
return true if hardlink?
|
return if hardlink?
|
||||||
|
return if File.exist? destination_path
|
||||||
|
|
||||||
FileUtils.mkdir_p(File.dirname(destination_path))
|
FileUtils.mkdir_p(File.dirname(destination_path))
|
||||||
FileUtils.ln(uploaded_path, destination_path).zero?
|
FileUtils.ln(uploaded_path, destination_path).zero?
|
||||||
|
|
Loading…
Reference in a new issue