From ce8c36790182d84772fccff8d8f62d208f2d2c1b Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 25 Jan 2021 13:44:36 -0800 Subject: [PATCH] When searching for renames, check if the old still exists. --- etiquette/photodb.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etiquette/photodb.py b/etiquette/photodb.py index d5dae5b..c824156 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -1609,6 +1609,11 @@ class PDBUtilMixin: except exceptions.NoSuchPhoto: return + if photo.real_path.is_file: + # Don't relocate the path if this is actually a hardlink, and + # both paths are current. + return + if photo.bytes != stat.st_size: return