mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-31 10:37:12 -04:00 
			
		
		
		
	Let unpaper overwrite temporary files.
I'm not sure what the circumstances are, but it looks like unpaper can attempt to write a temporary file that already exists [0]. This then fails the consumption. As per daedadu's comment simply letting unpaper overwrite files fixes this. [0] unpaper: error: output file '/tmp/paperless/paperless-pjkrcr4l/convert-0000.unpaper.pnm' already present. See https://web.archive.org/web/20181008081515/https://github.com/danielquinn/paperless/issues/406#issue-360651630
This commit is contained in:
		
							parent
							
								
									2ef2bf873e
								
							
						
					
					
						commit
						f948ee11be
					
				| @ -218,7 +218,8 @@ def run_convert(*args): | |||||||
| 
 | 
 | ||||||
| def run_unpaper(args): | def run_unpaper(args): | ||||||
|     unpaper, pnm = args |     unpaper, pnm = args | ||||||
|     command_args = unpaper, pnm, pnm.replace(".pnm", ".unpaper.pnm") |     command_args = (unpaper, "--overwrite", pnm, | ||||||
|  |                     pnm.replace(".pnm", ".unpaper.pnm")) | ||||||
|     if not subprocess.Popen(command_args).wait() == 0: |     if not subprocess.Popen(command_args).wait() == 0: | ||||||
|         raise ParseError("Unpaper failed at {}".format(command_args)) |         raise ParseError("Unpaper failed at {}".format(command_args)) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user