From a093dc273c8b8e4c38c530c75bfaa87a5f42436c Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 17 Sep 2020 20:38:17 -0700 Subject: [PATCH] Update self.real_path after relocating and renaming. --- etiquette/objects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etiquette/objects.py b/etiquette/objects.py index 46b62b0..54605d8 100644 --- a/etiquette/objects.py +++ b/etiquette/objects.py @@ -1033,7 +1033,7 @@ class Photo(ObjectBase): 'filepath': new_filepath.absolute_path, } self.photodb.sql_update(table='photos', pairs=data, where_key='id') - + self.real_path = new_filepath self._uncache() @decorators.required_feature('photo.add_remove_tag') @@ -1118,6 +1118,7 @@ class Photo(ObjectBase): 'filepath': (old_path.absolute_path, new_path.absolute_path), } self.photodb.sql_update(table='photos', pairs=data, where_key='filepath') + self.real_path = new_path if new_path.normcase == old_path.normcase: # If they are equivalent but differently cased, just rename.