]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Update consumer.py
authorshamoon <4887959+shamoon@users.noreply.github.com>
Thu, 7 Nov 2024 18:44:58 +0000 (10:44 -0800)
committershamoon <4887959+shamoon@users.noreply.github.com>
Thu, 7 Nov 2024 18:44:58 +0000 (10:44 -0800)
src/documents/consumer.py

index 64ae1fba954398a1f69396335fb955a4f22ecb1f..25dee5daf173521d995371ef25d81da5fe1b32ed 100644 (file)
@@ -150,7 +150,8 @@ class ConsumerPlugin(
         self.log.error(log_message or message, exc_info=exc_info)
         # Move the file to the failed directory
         if self.input_doc.original_file.exists():
-            self.input_doc.original_file.rename(
+            copy_file_with_basic_stats(
+                self.input_doc.original_file,
                 settings.CONSUMPTION_FAILED_DIR / self.input_doc.original_file.name,
             )
         raise ConsumerError(f"{self.filename}: {log_message or message}") from exception