This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients hollyroberts, paul.moore, steve.dower, steven.daprano, tim.golden, zach.ware
Date 2019-07-05.14:24:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562336649.0.0.995961060866.issue37506@roundup.psfhosted.org>
In-reply-to
Content
> it would be better for an exception to be thrown rather than creating a corrupt folder.

I am not convinced that Python should refuse to create a perfectly valid directory because some components of Windows sometimes have trouble resolving the pathname under some circumstances.

Microsoft say:

"Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not."

https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming_conventions

but Python is talking to the file system, not the shell or Windows Explorer.

This is a common problem, with numerous solutions:

https://superuser.com/questions/198256/how-to-delete-a-folder-containing-trailing-spaces

It's apparently quite common in shared environments where (for example) Mac users may copy files ending with a space onto Windows drives.
History
Date User Action Args
2019-07-05 14:24:09steven.dapranosetrecipients: + steven.daprano, paul.moore, tim.golden, zach.ware, steve.dower, hollyroberts
2019-07-05 14:24:08steven.dapranosetmessageid: <1562336649.0.0.995961060866.issue37506@roundup.psfhosted.org>
2019-07-05 14:24:08steven.dapranolinkissue37506 messages
2019-07-05 14:24:08steven.dapranocreate