mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
dirstate: make sure rootdir ends with directory separator (issue4557)
ntpath.join() of Python 2.7.9 does not work as expected if root is a UNC path to top of share. This patch doesn't take care of os.altsep, '/' on Windows, because root should be normalized by realpath().
This commit is contained in:
parent
9d2643c9ed
commit
d646851eb8
@ -38,7 +38,12 @@ class dirstate(object):
|
||||
self._opener = opener
|
||||
self._validate = validate
|
||||
self._root = root
|
||||
self._rootdir = os.path.join(root, '')
|
||||
# ntpath.join(root, '') of Python 2.7.9 does not add sep if root is
|
||||
# UNC path pointing to root share (issue4557)
|
||||
if root.endswith(os.sep):
|
||||
self._rootdir = root
|
||||
else:
|
||||
self._rootdir = root + os.sep
|
||||
self._dirty = False
|
||||
self._dirtypl = False
|
||||
self._lastnormaltime = 0
|
||||
|
Loading…
Reference in New Issue
Block a user