Skip to content

Commit d34e6be

Browse files
author
Guillermo Villar
committed
deleting a note won't delete parent folder anymore if no contents
1 parent 563bf7c commit d34e6be

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

backend/utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,7 @@ def delete_note(notes_dir: str, note_path: str) -> bool:
225225

226226
full_path.unlink()
227227

228-
# Remove empty parent directories
229-
try:
230-
full_path.parent.rmdir()
231-
except OSError:
232-
pass # Directory not empty, that's fine
228+
# Note: We don't automatically delete empty folders to preserve user's folder structure
233229

234230
return True
235231

0 commit comments

Comments
 (0)