Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9c014c0

Browse files
committed
minor change
1 parent 2a07af2 commit 9c014c0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/core/common.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -853,18 +853,18 @@ def urlEncodeCookieValues(cookieStr):
853853

854854
def directoryPath(path):
855855
retVal = None
856-
if path.find('/') != -1:
857-
retVal = posixpath.dirname(path)
858-
else:
856+
if isWindowsPath(path):
859857
retVal = ntpath.dirname(path)
858+
else:
859+
retVal = posixpath.dirname(path)
860860
return retVal
861861

862862
def normalizePath(path):
863863
retVal = None
864-
if path.find('/') != -1:
865-
retVal = posixpath.normpath(path)
866-
else:
864+
if isWindowsPath(path):
867865
retVal = ntpath.normpath(path)
866+
else:
867+
retVal = posixpath.normpath(path)
868868
return retVal
869869

870870
def safeStringFormat(formatStr, params):

0 commit comments

Comments
 (0)