From b5aee625580f64d32ae50c9acd9e95cc1ddd2886 Mon Sep 17 00:00:00 2001 From: Skia Date: Wed, 18 Apr 2018 22:54:30 +0200 Subject: [PATCH] core/models: don't always repair every single file --- core/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/models.py b/core/models.py index 43cafcb4..2f9a33f2 100644 --- a/core/models.py +++ b/core/models.py @@ -781,7 +781,7 @@ class SithFile(models.Model): for c in self.children.all(): c._repair_fs() return - else: + elif not self._check_path_consistence(): # First get future parent path and the old file name # Prepend "." so that we match all relative handling of Django's # file storage @@ -824,8 +824,8 @@ class SithFile(models.Model): print("file path: %s" % file_path, end='') print(" db path: %s" % db_path) return False - else: - return True + print("%s OK (%s)" % (self.id, file_path)) + return True def _check_fs(self): if self.is_folder: