1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 21:15:47 +01:00

Some smallish fixes.

--HG--
branch : testing
This commit is contained in:
Kris Maglione
2010-08-26 11:40:59 -04:00
parent cb4cc87272
commit a0cb07e7d7
13 changed files with 152 additions and 89 deletions

View File

@@ -103,12 +103,12 @@ function readFile(file) {
function writeFile(file, data) {
if (!file.exists())
file.create(file.NORMAL_FILE_TYPE, 0600);
file.create(file.NORMAL_FILE_TYPE, parseInt('0600', 8));
let fileStream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream);
let stream = Cc["@mozilla.org/intl/converter-output-stream;1"].createInstance(Ci.nsIConverterOutputStream);
fileStream.init(file, 0x20 | 0x08 | 0x02, 0600, 0); // PR_TRUNCATE | PR_CREATE | PR_WRITE
fileStream.init(file, 0x20 | 0x08 | 0x02, parseInt('0600', 8), 0); // PR_TRUNCATE | PR_CREATE | PR_WRITE
stream.init(fileStream, "UTF-8", 0, 0);
stream.writeString(data);