diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-08-12 21:57:45 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-08-12 21:57:45 +0100 |
| commit | 4b4ec85bc4f49e72244f7219539124b45b876d8e (patch) | |
| tree | 0aa4c2005526fa5130bccbfd26f3a9cab6f8d4cb /lib/unzip.js | |
| parent | 5f5217a4e16f7be697b24a46cf58e47753967d95 (diff) | |
Open zip file before passing to readers
Diffstat (limited to 'lib/unzip.js')
| -rw-r--r-- | lib/unzip.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/unzip.js b/lib/unzip.js index 51c34a3..ada19f3 100644 --- a/lib/unzip.js +++ b/lib/unzip.js @@ -13,9 +13,9 @@ function openZip(options) { if (options.path) { return readFile(options.path).then(zipfile.openArrayBuffer); } else if (options.buffer) { - return zipfile.openArrayBuffer(options.buffer); + return promises.resolve(zipfile.openArrayBuffer(options.buffer)); } else if (options.file) { - return options.file; + return promises.resolve(options.file); } else { return promises.reject(new Error("Could not find file in options")); } |
