mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
core/models: don't always repair every single file
This commit is contained in:
parent
52832eed4d
commit
b5aee62558
@ -781,7 +781,7 @@ class SithFile(models.Model):
|
|||||||
for c in self.children.all():
|
for c in self.children.all():
|
||||||
c._repair_fs()
|
c._repair_fs()
|
||||||
return
|
return
|
||||||
else:
|
elif not self._check_path_consistence():
|
||||||
# First get future parent path and the old file name
|
# First get future parent path and the old file name
|
||||||
# Prepend "." so that we match all relative handling of Django's
|
# Prepend "." so that we match all relative handling of Django's
|
||||||
# file storage
|
# file storage
|
||||||
@ -824,8 +824,8 @@ class SithFile(models.Model):
|
|||||||
print("file path: %s" % file_path, end='')
|
print("file path: %s" % file_path, end='')
|
||||||
print(" db path: %s" % db_path)
|
print(" db path: %s" % db_path)
|
||||||
return False
|
return False
|
||||||
else:
|
print("%s OK (%s)" % (self.id, file_path))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _check_fs(self):
|
def _check_fs(self):
|
||||||
if self.is_folder:
|
if self.is_folder:
|
||||||
|
Loading…
Reference in New Issue
Block a user