Bug 600066 - Don't use octal escape sequences in mochitest harness [r=ctalbert, a=NPOTB]

This commit is contained in:
Paul O’Shannessy 2010-09-28 11:54:29 -07:00
Родитель 07d817241a
Коммит 6da196ef08
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -275,7 +275,9 @@ function extractJarToTmp(jar) {
.getService(Components.interfaces.nsIProperties) .getService(Components.interfaces.nsIProperties)
.get("ProfD", Components.interfaces.nsILocalFile); .get("ProfD", Components.interfaces.nsILocalFile);
tmpdir.append("mochikit.tmp"); tmpdir.append("mochikit.tmp");
tmpdir.createUnique(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777); // parseInt is used because octal escape sequences cause deprecation warnings
// in strict mode (which is turned on in debug builds)
tmpdir.createUnique(Components.interfaces.nsIFile.DIRECTORY_TYPE, parseInt("0777", 8));
var zReader = Components.classes["@mozilla.org/libjar/zip-reader;1"]. var zReader = Components.classes["@mozilla.org/libjar/zip-reader;1"].
createInstance(Components.interfaces.nsIZipReader); createInstance(Components.interfaces.nsIZipReader);
@ -301,7 +303,9 @@ function extractJarToTmp(jar) {
var dirs = zReader.findEntries(filepath + '*/'); var dirs = zReader.findEntries(filepath + '*/');
while (dirs.hasMore()) { while (dirs.hasMore()) {
var targetDir = buildRelativePath(dirs.getNext(), tmpdir, filepath); var targetDir = buildRelativePath(dirs.getNext(), tmpdir, filepath);
targetDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777); // parseInt is used because octal escape sequences cause deprecation warnings
// in strict mode (which is turned on in debug builds)
targetDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, parseInt("0777", 8));
} }
//now do the files //now do the files