Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

"The following file couldn't be moved to trash (is gvfs-trash installed?)" when attempting to delete empty nested folder with "Collapse direc #799

Closed

Description

@SlimeQ

screenshot from 2016-04-08 17 21 42

with "Collapse directories" enabled, deleting an empty nested directory fails


ubuntu 14.04, atom 1.6.2

update: the first time attempting to delete /1/2/3, directory 3 is deleted but the tree is not updated. if the delete is attempted again the message above is shown. if the parent directory is collapsed and expanded again, it now shows /1/2. this process can be repeated until all directories are gone.

this seems somewhat related to #702

Activity

  1. tobbbles commented on Apr 28, 2016

    @tobbbles

    Same error issue on arch linux:

    Atom    : 1.7.2
    Electron: 0.36.12
    Chrome  : 47.0.2526.110
    Node    : 5.1.1
    
     Kernel Release: 4.5.1-1-ARCH
    OS: Arch Linux x86_64
    
  2. azat-io commented on May 1, 2016

    @azat-io

    Same error 😞

  3. piecedigital commented on May 1, 2016

    @piecedigital

    So, like... is this a recent issue? This wasn't happening a few days ago. It worked right out the box, unlike the Windows version.

  4. winstliu commented on May 1, 2016

    @winstliu
    Contributor

    Well, the notification was added in a recent release. Before failing to delete a file would fail silently without an error message.
    @mnzt, @azat-io, @piecedigital: are you all trying to delete a nested directory with "collapse directories" enabled?

  5. piecedigital commented on May 1, 2016

    @piecedigital

    @50Wliu I'm trying to delete several files in one directory, not even the directory itself.

  6. tobbbles commented on May 1, 2016

    @tobbbles

    @50Wliu same story as @piecedigital. Even doing the following results in the error.

    cd ~/
    atom some.file
    

    followed by trying to delete some.file

  7. piecedigital commented on May 1, 2016

    @piecedigital

    Okay... I fixed my issue simply by changing the owner to myself.

    Not sure how it changed in the first place...

  8. tobbbles commented on May 1, 2016

    @tobbbles

    I still cannot delete any file, even if owned by the user who launched atom

  9. winstliu commented on May 1, 2016

    @winstliu
    Contributor

    Ok. As this issue is talking specifically about deleting nested directories while "collapse empty directories" is enabled, can you please create a different issue? Thanks!

  10. adnanzulkarnain commented on Jun 12, 2016

    @adnanzulkarnain

    Same error

  11. gdlx commented on Jun 16, 2016

    @gdlx

    Same error on Windows and Atom 1.8

    (without the gvfs-trash reference)

  12. TreyJenkins commented on Jun 20, 2016

    @TreyJenkins

    Same error on 16.04

  13. 12 remaining items

  14. jeyj0 commented on Sep 9, 2016

    @jeyj0

    @TipiT's fix works for me, a solution by atom would be great though.

  15. macu commented on Oct 13, 2016

    @macu

    gvfs-trash is installed. It would be helpful if the error message displayed in Atom instead said the trash folder is missing. In my case I'm working in /var/www/... Fixed by following @TipiT's instructions.

  16. virtuald commented on Oct 16, 2016

    @virtuald

    When I run gvfs-trash manually, I get the following error on stdout:

    Error trashing file: Unable to find or create trash directory
    

    Perhaps atom should display that error?

  17. FRizZL commented on Oct 31, 2016

    @FRizZL

    The correct CMD (from @TipiT) is and worked perfectly!!:
    sudo mkdir -p /.Trash-1000/{expunged,files,info}; sudo chown -R $USER:$USER /.Trash-1000/

  18. elderalves commented on Dec 26, 2016

    @elderalves

    My problem with gvfs-trash was about permission issues in Trash folder.

    These steps on askubuntu helped me to solve my problem:

  19. miguelcg commented on Dec 29, 2016

    @miguelcg
    Contributor

    Pull request #1008 opened for this issue, feel free to review it! :)

  20. winstliu commented on Dec 31, 2016

    @winstliu
    Contributor

    Fixed by #1008.

    For those who arrive here by Google or another search engine, please open a new issue. This issue was specifically for a bug related to deleting squashed directories, not a general catch-all for the notification.

  21. brownman commented on Jan 24, 2017

    @brownman

    try:
    touch testFile
    gvfs-trash testFile
    Error trashing file: Unable to find or create trash directory

    problem:
    ls -ld ~/.local/share/Trash/ #results: drwx------ 4 root root 4

    fix:
    sudo chown -R $USER:$USER ~/.local/share/Trash/
    sudo chmod -R 700 ~/.local/share/Trash/
    gvfs-trash testFile

    ref:
    http://askubuntu.com/questions/636484/error-deleting-file-unable-to-find-or-create-wastebasket-directory-ubuntu-15-0

  22. tuf22191 commented on Jan 27, 2017

    @tuf22191

    Hey guys, just giving my 2 cents here: I was able to delete files when opened atom via terminal.
    Step 1) sudo atom (from terminal)
    Step 2) Click File on top left and go to Open Folder...
    Step 3) Open the directory/folder you would like and then you can see the files you want to delete and the deletion should work!

  23. jeyj0 commented on Jan 27, 2017

    @jeyj0

    @tuf22191 While this is actually already mentioned somewhere here if I'm not mistaken, it should also be noted that running Atom with sudo is not a clever idea, since you can also cause a lot more harm to your system than simply delete what you planned to. If you feel comfortable with it, feel free to continue using it, but I advise against it.

  24. tuf22191 commented on Jan 27, 2017

    @tuf22191

    @jeyj0 thanks for the advice (a little new to Linux)! You make a good point about the destructiveness inherent with using the sudo command with atom especially when deleting things

  25. winstliu commented on Feb 3, 2017

    @winstliu
    Contributor

    Because it appears that people are not reading this issue fully, I am locking it.

    Common solutions for this error

    1. Make sure that gvfs-trash is installed
    2. Make sure that a .Trash-1000 folder exists - if it doesn't, try these steps
    3. Make sure that the file is not locked

    If after those steps you are still unable to delete a file, please open a new issue and fill out the issue template. Thanks!

  26. locked and limited conversation to collaborators on Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions