mirror of
https://github.com/RustyRaptor/bluegriffon.git
synced 2026-12-03 16:05:15 -07:00
deprecating octals
This commit is contained in:
1 parent
3df29d1674
commit
f34e38ca95
3 files changed
+12
-12
No files matched your search
@@ -219,11 +219,11 @@ function WriteFile(aFilename, aData)
|
||||
var file = Components.classes["@mozilla.org/file/directory_service;1"].
|
||||
getService(Components.interfaces.nsIProperties).
|
||||
get("ProfD", Components.interfaces.nsIFile);
|
||||
file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0600);
|
||||
file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, parseInt("0600", 8));
|
||||
|
||||
var stream = Components.classes["@mozilla.org/network/safe-file-output-stream;1"].
|
||||
createInstance(Components.interfaces.nsIFileOutputStream);
|
||||
stream.init(file, 0x04 | 0x08 | 0x20, 0600, 0); // readwrite, create, truncate
|
||||
stream.init(file, 0x04 | 0x08 | 0x20, parseInt("0600", 8), 0); // readwrite, create, truncate
|
||||
|
||||
stream.write(aData, aData.length);
|
||||
if (stream instanceof Components.interfaces.nsISafeOutputStream) {
|
||||
@@ -235,7 +235,7 @@ function WriteFile(aFilename, aData)
|
||||
var dir = fp.file.clone();
|
||||
dir.append(aFilename);
|
||||
if (!dir.exists())
|
||||
dir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755);
|
||||
dir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, parseInt("0755", 8));
|
||||
|
||||
var sFile = UnzipPackage(file, dir);
|
||||
file.remove(false);
|
||||
@@ -289,7 +289,7 @@ function _installZipEntry(aZipReader, aZipEntry, aDestination, aFile)
|
||||
{
|
||||
file.append(dirs[i]);
|
||||
if (!file.exists())
|
||||
file.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755);
|
||||
file.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, parseInt("0755", 8));
|
||||
}
|
||||
|
||||
if (!isDirectory)
|
||||
|
||||
@@ -24,7 +24,7 @@ $(function() {
|
||||
return(null);
|
||||
|
||||
var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
|
||||
inputStream.init(file, 0x01, 00004, null);
|
||||
inputStream.init(file, 0x01, parseInt("00004", 8), null);
|
||||
var sInputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
|
||||
sInputStream.init(inputStream);
|
||||
svgCanvas.setSvgString(sInputStream.
|
||||
@@ -40,10 +40,10 @@ $(function() {
|
||||
return;
|
||||
|
||||
if (!file.exists())
|
||||
file.create(0, 0664);
|
||||
file.create(0, parseInt("0664", 8));
|
||||
|
||||
var out = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
|
||||
out.init(file, 0x20 | 0x02, 00004,null);
|
||||
out.init(file, 0x20 | 0x02, parseInt("00004", 8),null);
|
||||
out.write(str, str.length);
|
||||
out.flush();
|
||||
out.close();
|
||||
|
||||
+5
-5
@@ -2146,7 +2146,7 @@ ftpMozilla.prototype.ftp = {
|
||||
tmpFile.leafName = count + '-blankFile';
|
||||
}
|
||||
var foutstream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
|
||||
foutstream.init(tmpFile, 0x04 | 0x08 | 0x20, 0644, 0);
|
||||
foutstream.init(tmpFile, 0x04 | 0x08 | 0x20, parseInt("0644", 8), 0);
|
||||
foutstream.write("", 0);
|
||||
foutstream.close();
|
||||
|
||||
@@ -2557,7 +2557,7 @@ ftpDataSocketMozilla.prototype = {
|
||||
file = UrlUtils.newLocalFile(localPath);
|
||||
this.fileInstream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance();
|
||||
this.fileInstream.QueryInterface(Components.interfaces.nsIFileInputStream);
|
||||
this.fileInstream.init(file, 0x01, 0644, 0);
|
||||
this.fileInstream.init(file, 0x01, parseInt("0644", 8), 0);
|
||||
this.fileInstream.QueryInterface(Components.interfaces.nsISeekableStream);
|
||||
this.fileInstream.seek(0, filePartialBytes); // append or not to append
|
||||
} catch (ex) {
|
||||
@@ -2806,9 +2806,9 @@ dataListener.prototype = {
|
||||
this.fileOutstream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
|
||||
|
||||
if (this.bytesPartial) {
|
||||
this.fileOutstream.init(this.file, 0x04 | 0x10, 0644, 0);
|
||||
this.fileOutstream.init(this.file, 0x04 | 0x10, parseInt("0644", 8), 0);
|
||||
} else {
|
||||
this.fileOutstream.init(this.file, 0x04 | 0x08 | 0x20, 0644, 0);
|
||||
this.fileOutstream.init(this.file, 0x04 | 0x08 | 0x20, parseInt("0644", 8), 0);
|
||||
}
|
||||
|
||||
this.binaryOutstream = Components.classes["@mozilla.org/binaryoutputstream;1"].createInstance(Components.interfaces.nsIBinaryOutputStream);
|
||||
@@ -3377,7 +3377,7 @@ ftpMozilla.prototype.sftp = {
|
||||
tmpFile.leafName = count + '-blankFile';
|
||||
}
|
||||
var foutstream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
|
||||
foutstream.init(tmpFile, 0x04 | 0x08 | 0x20, 0644, 0);
|
||||
foutstream.init(tmpFile, 0x04 | 0x08 | 0x20, parseInt("0644", 8), 0);
|
||||
foutstream.write("", 0);
|
||||
foutstream.close();
|
||||
|
||||
|
||||
Reference in new issue
Block a user