Simplify log statement for Photo.rename_file.
This commit is contained in:
parent
718da6c5c3
commit
1acd570467
1 changed files with 2 additions and 3 deletions
|
@ -1093,9 +1093,6 @@ class Photo(ObjectBase):
|
|||
else:
|
||||
new_path = pathclass.Path(new_filename)
|
||||
#new_path.correct_case()
|
||||
|
||||
self.photodb.log.debug(old_path)
|
||||
self.photodb.log.debug(new_path)
|
||||
if (new_path.parent != old_path.parent) and not move:
|
||||
raise ValueError('Cannot move the file without param move=True.')
|
||||
|
||||
|
@ -1104,6 +1101,8 @@ class Photo(ObjectBase):
|
|||
|
||||
new_path.assert_not_exists()
|
||||
|
||||
self.photodb.log.debug('Renaming file "%s" -> "%s"', old_path.absolute_path, new_path.absolute_path)
|
||||
|
||||
os.makedirs(new_path.parent.absolute_path, exist_ok=True)
|
||||
|
||||
# The plan is to make a hardlink now, then delete the original file
|
||||
|
|
Loading…
Reference in a new issue