Bug 534762. Fix problem using --test-path on win32

This commit is contained in:
Jonathan Griffin 2009-12-29 15:31:09 -08:00
parent 4cc7c33107
commit a49c63534b

View File

@ -42,12 +42,26 @@
if ("testPath" in params && params.testPath) {
var extraPath = params.testPath;
var pathToCheck = chromeDir.clone().QueryInterface(Ci.nsILocalFile);
pathToCheck.appendRelativePath(extraPath);
if (pathToCheck.isDirectory()) {
chromeDir.appendRelativePath(extraPath);
url += extraPath + "/";
var pathIsFile = false;
try {
var pathParts = extraPath.toString().split("/");
for each (var part in pathParts) {
pathToCheck.append(part);
}
if (pathToCheck.isDirectory()) {
for each (var part in pathParts) {
chromeDir.append(part);
}
url += extraPath + "/";
}
else {
pathIsFile = true;
}
}
else {
catch (e) {
pathIsFile = true;
}
if (pathIsFile) {
singleTestPath = url + params.testPath;
}
}