flxzt / rnote

Sketch and take handwritten notes.
https://rnote.flxzt.net
GNU General Public License v3.0
7.8k stars 263 forks source link

prompt for confirmation when removing folders #1136

Open ishusain opened 2 months ago

ishusain commented 2 months ago

Describe the bug
I deleted the 'Documents' directory from the Default Workspace, corresponding to '~/Documents' linux directory.

The directory was permanently deleted, and not even a user dialog warning about this was issued.

The deleted directory wasn't moved to the Trash bin, it was permanently deleted.

I tried recovering it with the Linux tool 'testdisk' without success.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Workspace
  2. Delete a directory

Expected behavior

The deleted directory should have been moved to the Trash bin, or at least warn me that it was going to be permanently deleted.

Console Output

I can't provide the output because I turned off the computer to try to recover the deleted data with 'testdisk' Linux utility. I'm afraid that turning it on again will overwrite the unallocated disk sectors that were originally occupied by the deleted data.

Desktop

ishusain commented 2 months ago

So after using 'r-linux' data recovery tool, I could track the deleted files and find them in '~/.local/share/Trash/files/'. Just moving them to 'home/' solved the problem.

Anyway, I insist that RNote should have a pop-up dialog warning the user about this.

flxzt commented 1 month ago

Yes, agreed. At least when trashing folders that are not empty. It's too easy to accidentally do that currently

RayJW commented 1 week ago

I'll have a go at this if that's fine with everyone :) Can't promise a time frame though, I'll have to learn to deal with GTK first.