Message240430
> 2. os.ftruncate doesn't exist on Windows.
Steve Dower wrote a patch and the latest version looks good to me:
https://bugs.python.org/issue23668#msg240385
+ if 0 in os.fsencode(file):
+ raise ValueError('embedded null character')
IMO the check must be implemented in os.open() (in path_converter). It doesn't look right to have a differen behaviour on UNIX and Windows. path_converter() calls PyUnicode_FSConverter() on UNIX and this function checks for embedded null bytes.
So I would prefer to see the issue #23668 fixed and path_converter() fixed, instead of pushing pyio_fileio_fix.patch. |
|
Date |
User |
Action |
Args |
2015-04-10 16:14:25 | vstinner | set | recipients:
+ vstinner, pitrou, benjamin.peterson, stutzbach, alex, python-dev, piotr.dobrogost, serhiy.storchaka |
2015-04-10 16:14:25 | vstinner | set | messageid: <1428682465.92.0.00997229125938.issue21859@psf.upfronthosting.co.za> |
2015-04-10 16:14:25 | vstinner | link | issue21859 messages |
2015-04-10 16:14:25 | vstinner | create | |
|