giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.34k stars 457 forks source link

Preventing the use of a non-empty directory as storage type #2333

Closed A-ri-eL closed 7 months ago

A-ri-eL commented 1 year ago

It would be useful to prevent a non-empty directory from being used as a storage type when using multiple files as a backend. Unfortunately, no check is made in that sense, and as a consequence, I lost some files.

:(

giuspen commented 1 year ago

I'm sorry to hear that, I thought there is an overwrite confirmation, were you prompted from that dialog? Do you still think that CherryTree should refuse to overwrite a directory if not empty at all or maybe make it more clear in the overwrite confirmation that the directory is not empty?

giuspen commented 1 year ago

There is indeed a bug, the overwrite confirmation is not currently working in the multifold I'm going to fix this

A-ri-eL commented 1 year ago

Unfortunately I didn't get any overwrite confirmation prompt, but I think that it would be more secure if CT refused to select a directory that was not empty at all.

About the files: I managed to get them back :)