Browse Source

return error from cat_promise in node.fs.cat

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
389c80aece
  1. 4
      src/file.js

4
src/file.js

@ -10,7 +10,9 @@ node.fs.cat = function (path, encoding) {
encoding = encoding || "utf8";
open_promise.addErrback(function () { cat_promise.emitError(); });
open_promise.addErrback(function () {
cat_promise.emitError(new Error("Could not open " + path));
});
open_promise.addCallback(function (fd) {
var content = (encoding === "raw" ? [] : "");
var pos = 0;

Loading…
Cancel
Save