pyfilesystem2 icon indicating copy to clipboard operation
pyfilesystem2 copied to clipboard

WrapCachedDir does not work correctly with case-insensitive filesystems

Open Omniflux opened this issue 2 years ago • 0 comments

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

Omniflux avatar Jan 12 '23 02:01 Omniflux