Commit c3560e7f by willmcgugan

Made listdirinfo more robust

parent 78984c22
...@@ -325,13 +325,19 @@ class FS(object): ...@@ -325,13 +325,19 @@ class FS(object):
if not full or absolute: if not full or absolute:
return pathjoin(path, p) return pathjoin(path, p)
return [(p, self.getinfo(get_path(p))) def getinfo(p):
for p in self._listdir_helper(path, try:
widcard=wildcard, return self.getinfo(get_path(p))
full=full, except FSError:
absolute=absolute, return {}
dirs_only=dirs_only,
files_only=files_only)] return [(p, getinfo(get_path(p)))
for p in self.listdir(path,
wildcard=wildcard,
full=full,
absolute=absolute,
dirs_only=dirs_only,
files_only=files_only)]
def _listdir_helper(self, path, entries, def _listdir_helper(self, path, entries,
wildcard=None, wildcard=None,
......
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