getDocRoot changes

This commit is contained in:
Miroslav Stampar
2010-01-05 11:30:33 +00:00
parent bb61010a45
commit 71547a3496
2 changed files with 25 additions and 12 deletions

View File

@@ -27,11 +27,10 @@ import os
import re
import StringIO
import zlib
import ntpath
import posixpath
from lib.core.data import conf
from lib.core.data import kb
from lib.core.common import directoryPath
from lib.parse.headers import headersParser
from lib.parse.html import htmlParser
@@ -76,13 +75,10 @@ def parseResponse(page, headers):
reobj = re.compile(absFilePathRegExp)
for match in reobj.finditer(page):
absFilePath = match.group("result")
absFilePath = match.group("result").strip()
if absFilePath not in kb.absFilePaths:
if absFilePath.find('/') != -1:
dirname = posixpath.dirname(absFilePath)
else:
dirname = ntpath.dirname(absFilePath)
dirname = directoryPath(absFilePath)
kb.absFilePaths.add(dirname)
def decodePage(page, encoding):