-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't remove directory #2001
Comments
Check with a tool like Process Explorer whether something still has a handle to the directory open. I would assume that some other process (probably even outside of WSL) hasn't released all handles to the directory yet, so it is in a "marked for deletion but not actually deleted yet" state. Maybe it is the current working directory of some process? This is just how the deletion semantics in the Windows filesystem work (you are in a |
Yeah, looks like it might have been something like that...it wasn't there after a reboot anyway without any more attempts to delete it anyway. Is this something that can be fixed? I've used Linux/Unix for decades and never had something like this. Perhaps it's just something peculiar to Microsoft s/w that we have to put up with when we use files in /mnt/c? |
Well, the error message is In addition to the possibility that some other program is holding it open (which should give a different error message?) I'd look at the possibility that some view of the filesystem has not yet figured out that the directory has been deleted already, or that Windows (which is doing the deleting) has marked it deleted but hasn't finished its housekeeping for whatever reason, or the actual changes in the filesystem haven't been But all's well that ends well, I suppose. |
Well, I suppose I kept trying to delete it because |
The root cause of this is #966 (see also #1956, #1535 and friends). You see I just had a similar situation again, and my two cents are that even though it can't be simply fixed at the moment, it would maybe be better if a |
I wonder what 'ls' does with an EACCES failure? |
If I'm reading http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/ls.c correctly, I would say it does the same thing it does at #1877 where the error was EIO. It would probably show Only ENOENT has a special case according to the source code I linked above, because it can be caused by other things like dangling symlinks and ls tries to call That's why I meant that ENOENT is probably a bad choice as error code because it will make tools believe that they can create a file/folder with that name, which they can't, and it can cause weirder failure modes than EACCES or EIO, I believe. In fact it is even weirder that also any attempt to create a file/folder with that name will return |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Your Windows build number: (Type
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.15063]
What you're doing and what's happening:
Trying to remove a directory:
It seems to have gotten into this state as a result of an
rm -rf Annex
command. Note that cwd is/mnt/c/Users/David/Downloads
What's wrong / what should be happening instead:
It should have removed the directory when I did the rm -rf, and I should be able to remove the directory with rmdir and/or list it/etc.
Strace of the failing command, if applicable: (If
<cmd>
is failing, then runstrace -o strace.txt -ff <cmd>
, and post the strace.txt output here)See our contributing instructions for assistance.
The text was updated successfully, but these errors were encountered: