pyfilesystem2
pyfilesystem2 copied to clipboard
WrapCachedDir does not work correctly with case-insensitive filesystems
WrapCachedDir
does not work correctly with case-insensitive filesystems.
Should be documented or fixed...
Discovered while implementing fs.wrapcifs (Python 3.11+ only)
>>> from fs.osfs import OSFS
>>> from fs.wrap import WrapCachedDir
>>> e = OSFS('E:/')
>>> e.getmeta()['case_insensitive']
True
>>> e.isdir('Temp')
True
>>> e.isdir('temp')
True
>>> w = WrapCachedDir(e)
>>> w.getmeta()['case_insensitive']
True
>>> w.isdir('Temp')
True
>>> w.isdir('temp')
False