Cannot create a directory that does not exist
Version
Microsoft Windows [Version 10.0.19043.2006]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.10.102.1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
I have not been able to find what exact steps caused the issue, but I had some files and directories created in docker (wsl) on a bind mounted directory and then removed them in windows powershell.
Expected Behavior
If a directory cannot be seem by dir it should not exist!
Actual Behavior
mkdir fails with an error that says "File exists" but neither dir in wsl shows the directory nor the directory can be seen in Windows File Explorer.
Diagnostic Logs
No response
Try unmounting the dir:
$ unmount -f /path/to/dir
-f Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)
A restart fixed the problem. But, I still think this is a bug.
Can you provide concise repro steps? Or else this issue should be marked as solved.
Unfortunately, I can't. If you let me know what diagnostic information I can provide, I'll do it next time if it happens again.
Yep, seeing this exact thing right now.
ls -lh .
ls: cannot access 'dir': No such file or directory
total 0
d????????? ? ? ? ? ? dir
After deleting it from windows:
mkdir dir
mkdir: cannot create directory ‘dir’: File exists
rm -r dir
rm: cannot remove 'dir': No such file or directory
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!