mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Demonstrate and fix [ 783882 ] os.lstat crashes with Unicode filename.
Will also check in on the 2.3 branch.
This commit is contained in:
parent
5301d9c10d
commit
7edd0a9b21
2 changed files with 3 additions and 1 deletions
|
|
@ -25,6 +25,8 @@ f.close()
|
|||
# Test stat and chmod
|
||||
if os.stat(TESTFN_ENCODED) != os.stat(TESTFN_UNICODE):
|
||||
print "os.stat() did not agree on the 2 filenames"
|
||||
if os.lstat(TESTFN_ENCODED) != os.lstat(TESTFN_UNICODE):
|
||||
print "os.lstat() did not agree on the 2 filenames"
|
||||
os.chmod(TESTFN_ENCODED, 0777)
|
||||
os.chmod(TESTFN_UNICODE, 0777)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue