Commit 1864d596 by rfkelly0

CacheFSMixin: fix cached parent-dir handling in open()

parent 948084fa
...@@ -539,11 +539,12 @@ class CacheFSMixin(WrapFS): ...@@ -539,11 +539,12 @@ class CacheFSMixin(WrapFS):
if path in ("","/"): if path in ("","/"):
raise ResourceInvalidError(path) raise ResourceInvalidError(path)
try: try:
pci = self.__get_cached_info(dirname(path)) ppath = dirname(path)
pci = self.__get_cached_info(ppath)
except KeyError: except KeyError:
pass pass
else: else:
if not fs.utils.isdir(super(CacheFSMixin,self),path,pci.info): if not fs.utils.isdir(super(CacheFSMixin,self),ppath,pci.info):
raise ResourceInvalidError(path) raise ResourceInvalidError(path)
if pci.has_full_children: if pci.has_full_children:
raise ResourceNotFoundError(path) raise ResourceNotFoundError(path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment