mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
minor fix for Windows file paths, do not strip the windows drive letter
This commit is contained in:
parent
f97f575018
commit
52264f544e
|
@ -619,11 +619,12 @@ def getDocRoot():
|
||||||
if any("/%s/" % _ in absFilePath for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES):
|
if any("/%s/" % _ in absFilePath for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES):
|
||||||
for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES:
|
for _ in GENERIC_DOC_ROOT_DIRECTORY_NAMES:
|
||||||
_ = "/%s/" % _
|
_ = "/%s/" % _
|
||||||
|
|
||||||
if _ in absFilePath:
|
if _ in absFilePath:
|
||||||
docRoot = "%s%s" % (absFilePath.split(_)[0], _)
|
docRoot = "%s%s" % (absFilePath.split(_)[0], _)
|
||||||
break
|
break
|
||||||
|
|
||||||
elif pagePath in absFilePath:
|
if pagePath in absFilePath:
|
||||||
docRoot = absFilePath.split(pagePath)[0]
|
docRoot = absFilePath.split(pagePath)[0]
|
||||||
if windowsDriveLetter:
|
if windowsDriveLetter:
|
||||||
docRoot = "%s/%s" % (windowsDriveLetter, ntToPosixSlashes(docRoot))
|
docRoot = "%s/%s" % (windowsDriveLetter, ntToPosixSlashes(docRoot))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user