diff options
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 11a0a3efcb..091a242485 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -488,8 +488,8 @@ def relpath(path, start=curdir): if not path: raise ValueError("no path specified") - start_list = abspath(start).split(sep) - path_list = abspath(path).split(sep) + start_list = [x for x in abspath(start).split(sep) if x] + path_list = [x for x in abspath(path).split(sep) if x] if start_list[0].lower() != path_list[0].lower(): unc_path, rest = splitunc(path) unc_start, rest = splitunc(start) |