mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05: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:
		| @@ -218,7 +218,8 @@ def run_convert(*args): | ||||
|  | ||||
| def run_unpaper(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: | ||||
|         raise ParseError("Unpaper failed at {}".format(command_args)) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Martin
					David Martin