Commit 3990d4bb by btimby

ArchiveMountFS now accepts a root file system rather than a root_path. This…

ArchiveMountFS now accepts a root file system rather than a root_path. This allows "wrapping" file systems other than OSFS.
parent 1b67c210
......@@ -187,7 +187,6 @@ class ArchiveMountFS(mountfs.MountFS):
archives are mounted in place of the archive file.'''
def __init__(self, root, **kwargs):
super(ArchiveMountFS, self).__init__(**kwargs)
self.root_path = root_path
self.mountdir('/', root)
def ismount(self, path):
......@@ -204,7 +203,7 @@ class ArchiveMountFS(mountfs.MountFS):
break
if libarchive.is_archive_name(ppath):
# It looks like an archive, try mounting it.
full_path = pathjoin(self.root_path, relpath(ppath))
full_path = self.getsyspath(ppath)
try:
self.mountdir(ppath, ArchiveFS(full_path, 'r'))
except:
......
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