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

Skip to content

Commit 52264f5

Browse files
committed
minor fix for Windows file paths, do not strip the windows drive letter
1 parent f97f575 commit 52264f5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,11 +619,12 @@ def getDocRoot():
619619
if any("/%s/" % _ in absFilePath for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES):
620620
for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES:
621621
_ = "/%s/" % _
622+
622623
if _ in absFilePath:
623624
docRoot = "%s%s" % (absFilePath.split(_)[0], _)
624625
break
625626

626-
elif pagePath in absFilePath:
627+
if pagePath in absFilePath:
627628
docRoot = absFilePath.split(pagePath)[0]
628629
if windowsDriveLetter:
629630
docRoot = "%s/%s" % (windowsDriveLetter, ntToPosixSlashes(docRoot))

0 commit comments

Comments
 (0)