sqlalchemy-imageattach icon indicating copy to clipboard operation
sqlalchemy-imageattach copied to clipboard

Tests might fail on windows because of windows path length limit

Open qria opened this issue 9 years ago • 1 comments

Windows for some reason have a 260 character limit on file path and tests might fail while making a temporary file with a long name.

As a temporary solution I have modified fs.py to explicitly use extended-length path, by changing open(path_str, 'wb') to open('\\\\?\\' + path_str, 'wb') .

qria avatar Oct 07 '16 23:10 qria

Apparently Windows 10 supports paths longer than 260 characters without any prefix, and Python would eventually fix this at os.path/pathlib module.

https://bugs.python.org/issue18199

dahlia avatar Oct 11 '16 00:10 dahlia