Index: lib/io.js |
diff --git a/lib/io.js b/lib/io.js |
index 8cf974d4a87b8834c0262401ebf11b1499d3819b..1cdd590b6811d2e5cb533966ae77bf45d2247e6d 100644 |
--- a/lib/io.js |
+++ b/lib/io.js |
@@ -21,12 +21,7 @@ function readFileAsync(fileName) |
{ |
return new Promise((resolve, reject) => |
{ |
- _fileSystem.read(fileName, (result) => |
- { |
- if (result.error) |
- return reject(result.error); |
- resolve(result); |
- }); |
+ _fileSystem.read(fileName, resolve, reject); |
}); |
} |
@@ -51,12 +46,7 @@ exports.IO = |
{ |
return new Promise((resolve, reject) => |
{ |
- _fileSystem.readFromFile(fileName, listener, (error) => |
- { |
- if (error) |
- return reject(error); |
- resolve(); |
- }); |
+ _fileSystem.readFromFile(fileName, listener, resolve, reject); |
}); |
}, |