Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2eb24c6 commit d71e47cCopy full SHA for d71e47c
1 file changed
lib/request/basic.py
@@ -27,6 +27,8 @@
27
import re
28
import StringIO
29
import zlib
30
+import ntpath
31
+import posixpath
32
33
from lib.core.data import conf
34
from lib.core.data import kb
@@ -77,7 +79,11 @@ def parseResponse(page, headers):
77
79
absFilePath = match.group("result")
78
80
81
if absFilePath not in kb.absFilePaths:
- kb.absFilePaths.add(os.path.dirname(absFilePath))
82
+ if absFilePath.find('/') != -1:
83
+ dirname = posixpath.dirname(absFilePath)
84
+ else:
85
+ dirname = ntpath.dirname(absFilePath)
86
+ kb.absFilePaths.add(dirname)
87
88
def decodePage(page, encoding):
89
"""
0 commit comments