diskonaut icon indicating copy to clipboard operation
diskonaut copied to clipboard

Bug: when deleting a folder that contains a file we can't delete, we get an uninformative message

Open imsnif opened this issue 5 years ago • 2 comments

To reproduce:

  1. Create folder /path_to_my/folder
  2. Create nested_folder /path_to_my/folder/nested_folder
  3. Create a file inside nested_folder /path_to_my_folder/folder/nested_folder/file.txt
  4. Change the permissions of nested_folder to be read only.
  5. Start diskonaut and give it /path_to_my as its path (diskonaut /path_to_my).
  6. Try to delete folder.
  7. See that we get an uninformative error message and are unsure what happened.

In this scenario, the message should read something like "Permission denied deleting /path_to_my/folder/nested_folder".

imsnif avatar Jun 17 '20 14:06 imsnif

@imsnif

Try to delete folder.

Is this deleting folder path_to_my or nested_folder? I prefer the message that you can figure out which folder can’t you delete.Although, current implementation is not able to delete the folder and its nested folders one by one recursively. Thus it difficult to indicate which is not permitted folder

u5surf avatar Jun 18 '20 22:06 u5surf

I agree @u5surf. We'll have to implement a recursive delete of our own and catch these errors in order to do this. I would also definitely like to have the error showing the folder that failed and not its parent.

imsnif avatar Jun 19 '20 11:06 imsnif