Simplify log statement for Photo.rename_file.

This commit is contained in:
voussoir 2020-09-20 11:41:33 -07:00
parent 718da6c5c3
commit 1acd570467

View file

@ -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