Commit 83370fc4 by btimby

Support opening the archive directly

parent f4896c98
......@@ -98,6 +98,9 @@ class ArchiveFS(FS):
@synchronize
def open(self, path, mode="r", **kwargs):
path = normpath(relpath(path))
if path == '':
# We need to open the archive itself, not one of it's entries.
return file(self.root_path, mode)
if 'a' in mode:
raise Exception('Unsupported mode ' + mode)
if 'r' in mode:
......
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