Delete photo's thumbnail when deleting the file.
A minor oversight, I think you'll agree.
This commit is contained in:
		
							parent
							
								
									949e6f68fe
								
							
						
					
					
						commit
						d531c66bf0
					
				
					 1 changed files with 11 additions and 2 deletions
				
			
		|  | @ -821,8 +821,17 @@ class Photo(ObjectBase): | ||||||
|             else: |             else: | ||||||
|                 self.photodb.log.debug('Deleting %s', path) |                 self.photodb.log.debug('Deleting %s', path) | ||||||
|                 action = os.remove |                 action = os.remove | ||||||
|             queue_action = {'action': action, 'args': [path]} | 
 | ||||||
|             self.photodb.on_commit_queue.append(queue_action) |             self.photodb.on_commit_queue.append({ | ||||||
|  |                 'action': action, | ||||||
|  |                 'args': [path], | ||||||
|  |             }) | ||||||
|  |             if self.thumbnail and self.thumbnail.is_file: | ||||||
|  |                 self.photodb.on_commit_queue.append({ | ||||||
|  |                     'action': action, | ||||||
|  |                     'args': [self.thumbnail.absolute_path], | ||||||
|  |                 }) | ||||||
|  | 
 | ||||||
|         self._uncache() |         self._uncache() | ||||||
|         self.deleted = True |         self.deleted = True | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue