Commit 87a736d5 by willmcgugan

Support for Windows long paths in opener, and multifs fix

parent 0ae89aa3
......@@ -94,7 +94,7 @@ class MultiFS(FS):
self.auto_close = auto_close
self.fs_sequence = []
self.fs_lookup = {}
self.write_fs = None
self.writefs = None
@synchronize
def __str__(self):
......@@ -112,12 +112,12 @@ class MultiFS(FS):
if self.auto_close:
for fs in self.fs_sequence:
fs.close()
if self.write_fs is not None:
self.write_fs.close()
if self.writefs is not None:
self.writefs.close()
# Discard any references
del self.fs_sequence[:]
self.fs_lookup.clear()
self.write_fs = None
self.writefs = None
super(MultiFS, self).close()
@synchronize
......
......@@ -84,6 +84,8 @@ class NoOpenerError(OpenerError):
def _expand_syspath(path):
if path is None:
return path
if path.startswith('\\\\?\\'):
path = path[4:]
path = os.path.expanduser(os.path.expandvars(path))
path = os.path.normpath(os.path.abspath(path))
return path
......
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