Commit edb57234 by rfkelly0

improved UNC path handling, thanks to Julien Bouquillon

parent dd1cfb14
......@@ -108,7 +108,11 @@ class OSFS(OSFSXAttrMixin, OSFSWatchMixin, FS):
if not root_path.startswith("\\"):
root_path = u"\\\\?\\" + root_path
else:
root_path = u"\\\\?" + root_path
# Explicitly mark UNC paths, seems to work better.
if root_path.startswith("\\\\"):
root_path = u"\\\\?\\UNC\\" + root_path[2:]
else:
root_path = u"\\\\?" + root_path
# If it points at the root of a drive, it needs a trailing slash.
if len(root_path) == 6 and not root_path.endswith("\\"):
root_path = root_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