[New-bugs-announce] [issue23463] Incorrect behaviour when opening files containing colons on Windows
Tom Edwards
report at bugs.python.org
Sat Feb 14 12:54:00 CET 2015
New submission from Tom Edwards:
Consider this script:
f = open("bug>test.txt",'w')
f.write("hello")
f.close()
On Windows the first line will throw an OSError exception because the character '>' is not valid in an NTFS filename. This is correct.
Now consider this script:
f = open("bug:test.txt",'w')
f.write("hello")
f.close()
This script will complete without error, and f.write will return 5. This despite the colon character also being invalid in NTFS filenames!
The output of the second script is an empty file called "bug" in the working directory. I expect it to throw the same exception as the first script.
----------
components: IO
messages: 235964
nosy: Artfunkel
priority: normal
severity: normal
status: open
title: Incorrect behaviour when opening files containing colons on Windows
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23463>
_______________________________________
More information about the New-bugs-announce
mailing list