http://qs321.pair.com?node_id=11107341


in reply to Re: Why are there no errors when opening a filename that contains colons on Win10
in thread Why are there no errors when opening a filename that contains colons on Win10

Hi Bill.

You expect open to identify and reject all invalid names.

What I actually said in my OP was:

[...] before this I trusted the open to tell me if there was a problem with creating an output file.

In this case with a colon in the filename, a file was created successfully and output was correctly written to the Alternate Data Stream as the other monks demonstrated to me. I bet I'm not the only one who had never heard of this newer feature of Windows. I was surprised and curious about this. My current script doesn't really need to completely validate the filenames since the names are not from user inputs. However I have coworkers who sometimes make clumsy changes so I try to make things bulletproof.

Have you seen cases where the open() function did not correctly identify and reject invalid names?