Skip to content

Commit f5526eb

Browse files
committed
Fix a few bugs, integrate with rebased code.
1 parent 1e84c4d commit f5526eb

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/filesystem/impls/filer/ArchiveUtils.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,12 @@ define(function (require, exports, module) {
166166
}
167167

168168
fs.stat(path.absPath, function(err, stats) {
169-
if(err && err.code !== "ENOENT") {
170-
return callback(err);
169+
if(err) {
170+
if(err.code !== "ENOENT") {
171+
return callback(err);
172+
}
173+
174+
return FilerUtils.writeFileAsBinary(path.absPath, path.data, callback);
171175
}
172176

173177
if (stats.type !== "FILE") {

src/filesystem/impls/filer/lib/WebKitFileImport.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ define(function (require, exports, module) {
3535
FileSystem = require("filesystem/FileSystem"),
3636
FileUtils = require("file/FileUtils"),
3737
Strings = require("strings"),
38+
StringUtils = require("utils/StringUtils"),
3839
Filer = require("filesystem/impls/filer/BracketsFiler"),
3940
Path = Filer.Path,
4041
fs = Filer.fs(),
@@ -132,7 +133,7 @@ define(function (require, exports, module) {
132133
onError(deferred, filename, err);
133134
return;
134135
}
135-
136+
136137
// See if this file is worth trying to open in the editor or not
137138
if(shouldOpenFile(filename, encoding)) {
138139
pathList.push(filename);

0 commit comments

Comments
 (0)