Difference between os.path.isdir and Path.is_dir

Cameron Simpson cs at cskk.id.au
Thu Jul 25 19:28:57 EDT 2019


On 25Jul2019 13:40, eryk sun <eryksun at gmail.com> wrote:
>Windows trims trailing spaces and dots from the final component of a
>path, unless we use a non-normalized \\?\ path.

Hoo!

Well, that explains some extremely weird NAS behaviour I encountered the 
other month with some paths ending in spaces. (My machine and I think 
also the NAS were UNIX/Linux at each end, but speaking over SMB.) 
Guessing that the NAS was doing only a half hearted implementation of 
the trailing spaces semantics.

Interesting:-)

Cheers,
Cameron Simpson <cs at cskk.id.au>



More information about the Python-list mailing list