Commit c4c1fb81 by rfkelly0

CacheFS: fix cache clearing for the root path

parent d9a41f69
...@@ -21,6 +21,7 @@ FS subclasses interfacing with a remote filesystem. These include: ...@@ -21,6 +21,7 @@ FS subclasses interfacing with a remote filesystem. These include:
""" """
import sys
import time import time
import copy import copy
from StringIO import StringIO from StringIO import StringIO
...@@ -547,7 +548,10 @@ class CacheFS(WrapFS): ...@@ -547,7 +548,10 @@ class CacheFS(WrapFS):
cache[""].pop("listdir",None) cache[""].pop("listdir",None)
cache[""].pop("listdirinfo",None) cache[""].pop("listdirinfo",None)
# Clear all cached info for the path itself. # Clear all cached info for the path itself.
if names:
cache[names[-1]] = {"":{}} cache[names[-1]] = {"":{}}
else:
cache[""] = {}
@_cached_method @_cached_method
def exists(self,path): def exists(self,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