mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-31 02:27:10 -04:00 
			
		
		
		
	Be sure the scratch directory exists before using it as temporary directory
This commit is contained in:
		
							parent
							
								
									72efb24b73
								
							
						
					
					
						commit
						c422a081bf
					
				| @ -156,11 +156,13 @@ class Command(BaseCommand): | ||||
|         zip_export: bool = options["zip"] | ||||
| 
 | ||||
|         # If zipping, save the original target for later and | ||||
|         # get a temporary directory for the target | ||||
|         # get a temporary directory for the target instead | ||||
|         temp_dir = None | ||||
|         original_target = None | ||||
|         if zip_export: | ||||
|             original_target = self.target | ||||
| 
 | ||||
|             os.makedirs(settings.SCRATCH_DIR, exist_ok=True) | ||||
|             temp_dir = tempfile.TemporaryDirectory( | ||||
|                 dir=settings.SCRATCH_DIR, | ||||
|                 prefix="paperless-export", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user