Skip to content

Adding verification of the permissions of the Trash directory #87

@Wh1isper

Description

@Wh1isper

Issues and proposals

As sometimes the root of a mounted directory doesn't guarantee the creation of a new folder(Jupyter have seen many jupyterlab/jupyterlab#15589 (comment)), I'd suggest adding verification of the permissions of the Trash directory.

https://github.com/arsenetar/send2trash/blob/1.8.2/send2trash/plat_other.py#L210

MAYBE related issues

Details

We can try a range of possible paths until we succeed or ultimately fail.

  1. Sort optional paths by device
  2. Verify permissions, use the correct libraries for the move based on the DEVICE(maybe just move it, if Permission denied try the next one)
  3. Throws an error if all paths cannot be moved in. Here I want to be able to ignore the error and just unlink the file/folder, maybe something like force=True in args (default is False of course).

Any questions or advice? Feel free to let me know and I'm willing to make a pull request :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions