]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Chore: clarify file deletion logging
authorshamoon <4887959+shamoon@users.noreply.github.com>
Fri, 27 Jun 2025 20:34:44 +0000 (13:34 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Fri, 27 Jun 2025 20:34:44 +0000 (13:34 -0700)
src/documents/consumer.py

index 31db723d933aad87c6aea2252f85605566ff47da..8165d6cff41e12fa3affed6c0a0a233f50249e04 100644 (file)
@@ -533,10 +533,14 @@ class ConsumerPlugin(
                 document.save()
 
                 # Delete the file only if it was successfully consumed
-                self.log.debug(f"Deleting file {self.working_copy}")
+                self.log.debug(f"Deleting original file {self.input_doc.original_file}")
                 self.input_doc.original_file.unlink()
+                self.log.debug(f"Deleting working copy {self.working_copy}")
                 self.working_copy.unlink()
                 if self.unmodified_original is not None:  # pragma: no cover
+                    self.log.debug(
+                        f"Deleting unmodified original file {self.unmodified_original}",
+                    )
                     self.unmodified_original.unlink()
 
                 # https://github.com/jonaswinkler/paperless-ng/discussions/1037
@@ -546,7 +550,7 @@ class ConsumerPlugin(
                 )
 
                 if Path(shadow_file).is_file():
-                    self.log.debug(f"Deleting file {shadow_file}")
+                    self.log.debug(f"Deleting shadow file {shadow_file}")
                     Path(shadow_file).unlink()
 
         except Exception as e: