On Windows 10 within my Ubuntu Subsystem, when I open a file in a directory and try to rename that directory while that file is open, I am unable to do so.
Example:
$mkdir demo
$touch demo/test.txt
$CtlZ
$[2]+ Stopped vim demo/test.txt
$mv demo demo100
mv: cannot move 'demo' to 'demo100': Permission denied
And now when I close the file I can rename it.
$mv demo demo100
$ls demo100
test.txt
This seems like unexpected behavior. When I do the same test on a regular Ubuntu box, I am able to rename the file without a problem. Any ideas as to what might cause this?