Bug 634666 - File streams perform disk I/O when being initialized. r=philikon a=blocking-fennec

This commit is contained in:
Alon Zakai 2011-03-04 18:39:38 -08:00
Родитель f6f788b8a4
Коммит a645dd4b91
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -1140,7 +1140,8 @@ let Utils = {
let fos = Cc["@mozilla.org/network/safe-file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
fos.init(file, MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE, PERMS_FILE, 0);
fos.init(file, MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE, PERMS_FILE,
fos.DEFER_OPEN || 0);
let is = this._utf8Converter.convertToInputStream(out);
NetUtil.asyncCopy(is, fos, function (result) {
if (typeof callback == "function") {