mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Clear file before unlinking (#5259)
This commit is contained in:
		
							parent
							
								
									93f2316711
								
							
						
					
					
						commit
						7926ddd008
					
				| @ -411,6 +411,10 @@ class RecordingCleanup(threading.Thread): | ||||
|             logger.debug(f"Checking tmp clip {p}.") | ||||
|             if p.stat().st_mtime < (datetime.datetime.now().timestamp() - 60 * 1): | ||||
|                 logger.debug("Deleting tmp clip.") | ||||
| 
 | ||||
|                 # empty contents of file before unlinking https://github.com/blakeblackshear/frigate/issues/4769 | ||||
|                 with open(p, "w"): | ||||
|                     pass | ||||
|                 p.unlink(missing_ok=True) | ||||
| 
 | ||||
|     def expire_recordings(self): | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user