Add a little defense against mtime == 0.

master
voussoir 2021-05-08 18:25:12 -07:00
parent 59654a89e6
commit bb782d18b9
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 1 additions and 1 deletions

View File

@ -1639,7 +1639,7 @@ class PDBUtilMixin:
a file that's already in the database. a file that's already in the database.
''' '''
same_meta = self.get_photos_by_sql( same_meta = self.get_photos_by_sql(
'SELECT * FROM photos WHERE mtime == ? AND bytes == ?', 'SELECT * FROM photos WHERE mtime != 0 AND mtime == ? AND bytes == ?',
[filepath.stat.st_mtime, filepath.stat.st_size] [filepath.stat.st_mtime, filepath.stat.st_size]
) )
same_meta = [photo for photo in same_meta if not photo.real_path.is_file] same_meta = [photo for photo in same_meta if not photo.real_path.is_file]