Skip to content
Snippets Groups Projects
Commit 73e1ab39 authored by Adrian Buehlmann's avatar Adrian Buehlmann
Browse files

store: fncache may contain non-existent entries (fixes b9a56b816ff2)

parent df55ce68
No related branches found
No related tags found
No related merge requests found
......@@ -527,9 +527,10 @@
'''Checks if the store contains path'''
path = "/".join(("data", path))
# check for files (exact match)
if path + '.i' in self.fncache:
e = path + '.i'
if e in self.fncache and self._exists(e):
return True
# now check for directories (prefix match)
if not path.endswith('/'):
path += '/'
for e in self.fncache:
......@@ -531,9 +532,9 @@
return True
# now check for directories (prefix match)
if not path.endswith('/'):
path += '/'
for e in self.fncache:
if e.startswith(path):
if e.startswith(path) and self._exists(e):
return True
return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment