dahlia / sqlalchemy-imageattach

SQLAlchemy extension for attaching images to entities.
https://sqlalchemy-imageattach.readthedocs.io/
MIT License
116 stars 25 forks source link

Tests might fail on windows because of windows path length limit #38

Open qria opened 8 years ago

qria commented 8 years ago

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') .

dahlia commented 8 years ago

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