Add a trailing separator for windows drive path

Fixes  #2581, #2526
This commit is contained in:
mano3m
2013-12-29 23:25:53 +01:00
parent 4a36c3b6a8
commit f08d34b816
3 changed files with 18 additions and 6 deletions
+5
View File
@@ -60,9 +60,14 @@ def sp(path, *args):
path = os.path.normcase(os.path.normpath(ss(path, *args)))
# Remove any trailing path separators
if path != os.path.sep:
path = path.rstrip(os.path.sep)
# Add a trailing separator in case it is a root folder on windows
if len(path) == 2 and path[1] == ':':
path = path + os.path.sep
return path
def ek(original, *args):