summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-09-03 10:37:11 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:20 +0100
commit9f399911b6a961187c4d01eaf39b1aea6bbc2dab (patch)
tree7003e5bd29cdb0313f1d08e8d5793cf579e9e292 /ishtar_common/models.py
parent2dac896835dd74541c4960492119fd9c52c5a7a3 (diff)
downloadIshtar-9f399911b6a961187c4d01eaf39b1aea6bbc2dab.tar.bz2
Ishtar-9f399911b6a961187c4d01eaf39b1aea6bbc2dab.zip
Fix document symlink error
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 04ed6d6c0..d26a64e38 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -5779,7 +5779,10 @@ class Document(BaseHistorizedItem, QRCodeItem, OwnPerms, ImageModel,
links.append(new_path)
if match: # the current link is correct
continue
- os.symlink(reference_path, new_path)
+ try:
+ os.symlink(reference_path, new_path)
+ except FileExistsError:
+ pass
return links
def related_label(self):