Message347346
If we use os.mkdir to create a folder as follows:
os.mkdir("C:/test /")
Then we successfully create a folder with name "test ". This folder can be accessed normally, but it cannot be renamed or deleted. Instead we get the following error message:
Could not find this item
This is no longer located in C:\. Verify the item's location and try again.
I used Python 3.7.3 (64 bit) and Windows 1809
Obviously this is down to how windows doesn't handle paths particularly nicely, so it's not really python's fault. However even if it's decided that python shouldn't handle this then it would be better for an exception to be thrown rather than creating a corrupt folder.
Note: We can delete the folder by using the Long UNC path, eg. rd "\\?\C:\test " |
|
Date |
User |
Action |
Args |
2019-07-05 14:01:48 | hollyroberts | set | recipients:
+ hollyroberts |
2019-07-05 14:01:48 | hollyroberts | set | messageid: <1562335308.56.0.146479172275.issue37506@roundup.psfhosted.org> |
2019-07-05 14:01:48 | hollyroberts | link | issue37506 messages |
2019-07-05 14:01:48 | hollyroberts | create | |
|