[elbe-devel] [PATCH] elbepack: efilesystem: properly detect modification of excursed files

Thomas Weißschuh thomas.weissschuh at linutronix.de
Wed May 22 12:32:18 CEST 2024


The check should validate that the file was not modified
*in relation to its excursed reference*.
This check was wrong, fix it.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/efilesystem.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
index 3721c07f1384..6fa87a316f27 100644
--- a/elbepack/efilesystem.py
+++ b/elbepack/efilesystem.py
@@ -285,7 +285,7 @@ class Excursion:
     def _undo_excursion(self, rfs):
         saved_to = self._saved_to()
 
-        if not _file_or_directory_seem_equal(rfs.fname(self.origin), rfs.fname(saved_to)):
+        if not _file_or_directory_seem_equal(rfs.fname(self.origin), self.origin):
             # Excursed file was modified, keep the changes.
             return
 

---
base-commit: dfb4a8a89573e88f4d2d9e297b23973092a524e8
change-id: 20240522-recurse-check-existing-0f86e9afd5ba

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh at linutronix.de>



More information about the elbe-devel mailing list