Add a little defense against mtime == 0.
This commit is contained in:
		
							parent
							
								
									59654a89e6
								
							
						
					
					
						commit
						bb782d18b9
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -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] | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue