The Seafile trashbin requires files to be restored in reverse temporal order they were deleted. Otherwise path information is lost upon restoration.
This is critical for files that have generic names, like “readme.md” or “license.txt” etc.
This is the problematic behavior:
- Delete folder `Level 1’
The trash bin now looks like this:
The restored file appears at the root path of the library instead of its original path
Level 1/Level 2/file 1.md. Confusingly, the file also remains visible in the trash bin!
The folder, including its subfolder
Level 2 and
file 3.md present at time of putting into trash are correctly restored. The folder disappears from Trash.
The file appears at its original path
Level 1/Level 2/file 2.md and disappears from the Trash.
If a file is restored but its original path is not existing at time of restoration, the restored file will re-appear in a different location and remain in the Trash.
This behavior is highly confusing and can easily lead to data loss because it will not be possible to know where the file was originally located. You want to have a
license.txt file re-appear in the correct open source project folder, and a
printing instructions.docx in the folder with the correct images you send to an offset printer.
Every reasonable graphical user interface desktop since Windows 95 restores files from the trash bin including their path. Since I don’t have Windows 95 available right now, here is how it works in Windows XP and has ever since:
Starting out with a similar directory structure as in Seafile:
file_1. It appears in the recyble bin:
folder_1. It appears in the recycle bin:
file_1 from the recycle bin. It is restored with its full original path
folder_1 is still in the recycle bin.
file_2 re-appears at its previous path
folder_1\folder_2\file_2. The recycle bin is now empty.
Perfect! The same mechanism is used on Windows 7, Windows 10, Windows 11, Mac OS and most Linux desktops. It makes sense and helps to prevent data loss.
It would be great if Seafile would handle it in the same way.