Commit c223894c by rfkelly0

fix some broken/missing ilistdir implementations

parent b202f48c
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
fs.contrib.davfs.xmlobj: dexml model definitions for WebDAV fs.contrib.davfs.xmlobj: dexml model definitions for WebDAV
This module defines the various XML elemen structures for WebDAV as a set This module defines the various XML element structures for WebDAV as a set
of dexml.Model subclasses. of dexml.Model subclasses.
""" """
......
...@@ -226,7 +226,7 @@ class MountFS(FS): ...@@ -226,7 +226,7 @@ class MountFS(FS):
if fs is self: if fs is self:
paths = self.mount_tree.names(path) paths = self.mount_tree.names(path)
for path in self._listdir_helper(path,wildcard,full,absolute,dirs_only,files_only): for path in self._listdir_helper(path,paths,wildcard,full,absolute,dirs_only,files_only):
yield path yield path
else: else:
paths = fs.ilistdir(delegate_path, paths = fs.ilistdir(delegate_path,
......
...@@ -149,6 +149,12 @@ class SimulateXAttr(WrapFS): ...@@ -149,6 +149,12 @@ class SimulateXAttr(WrapFS):
entries = self.wrapped_fs.listdir(path,**kwds) entries = self.wrapped_fs.listdir(path,**kwds)
return [e for e in entries if not self._is_attr_path(e)] return [e for e in entries if not self._is_attr_path(e)]
def ilistdir(self,path="",**kwds):
"""Prevent .xattr from appearing in listings."""
for e in self.wrapped_fs.ilistdir(path,**kwds):
if not self._is_attr_path(e):
yield e
def remove(self,path): def remove(self,path):
"""Remove .xattr when removing a file.""" """Remove .xattr when removing a file."""
attr_file = self._get_attr_path(path,isdir=False) attr_file = self._get_attr_path(path,isdir=False)
......
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