From 84d89854ce02a5833e88bfd9c150b8e90b51b4a5 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 3 Nov 2026 08:43:49 +0100 Subject: fix(app): harden the editor save path and the picker - Run the save's write, original delete, autofill and history updates under NonCancellable so a recreated activity cannot leave a half done rename. - fsync the temporary file before the atomic move. - Move dialog: refuse targets outside the store (symlinks) and moving a folder into itself or a descendant, with a toast. - Folder picker: do not navigate into a new folder whose mkdirs failed; show a toast (new string, en and it). - Normalize entryFile so "./" and "a/../b" give the same keys as the list; covered in EditorModelTest. Co-Authored-By: Claude Opus 5.5 --- app/src/test/java/app/passwordstore/ui/editor/EditorModelTest.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/src/test/java') diff --git a/app/src/test/java/app/passwordstore/ui/editor/EditorModelTest.kt b/app/src/test/java/app/passwordstore/ui/editor/EditorModelTest.kt index 81174d05..160434c9 100644 --- a/app/src/test/java/app/passwordstore/ui/editor/EditorModelTest.kt +++ b/app/src/test/java/app/passwordstore/ui/editor/EditorModelTest.kt @@ -77,6 +77,10 @@ class EditorModelTest { entryFile(root, EditorForm(name = " mail ", dir = "work")), ) assertEquals(File(root, "mail.gpg"), entryFile(root, EditorForm(name = "mail"))) + assertEquals( + File(root, "b/mail.gpg"), + entryFile(root, EditorForm(name = "mail", dir = "./a/../b")), + ) } @Test -- cgit v1.2.3