This commit is contained in:
Bernardo Damele 2010-04-22 16:35:22 +00:00
parent 7b070acd17
commit 0f80768e66

View File

@ -310,7 +310,7 @@ def getDirs(webApi=None):
if absFilePath: if absFilePath:
directory = directoryPath(absFilePath) directory = directoryPath(absFilePath)
if isWindowsPath(directory): if isWindowsPath(directory):
ntToPosixSlashes(directory) directory = ntToPosixSlashes(directory)
if directory == '/': if directory == '/':
continue continue
directories.add(directory) directories.add(directory)
@ -980,10 +980,12 @@ def urlEncodeCookieValues(cookieStr):
def directoryPath(path): def directoryPath(path):
retVal = None retVal = None
if isWindowsDriveLetterPath(path):
if isWindowsPath(path):
retVal = ntpath.dirname(path) retVal = ntpath.dirname(path)
else: else:
retVal = posixpath.dirname(path) retVal = posixpath.dirname(path)
return retVal return retVal
def normalizePath(path): def normalizePath(path):
@ -992,7 +994,8 @@ def normalizePath(path):
and ntToPosixSlashes() and ntToPosixSlashes()
""" """
retVal = None retVal = None
if isWindowsDriveLetterPath(path):
if isWindowsPath(path):
retVal = ntpath.normpath(path) retVal = ntpath.normpath(path)
else: else:
retVal = posixpath.normpath(path) retVal = posixpath.normpath(path)