diff options
Diffstat (limited to 'lib/zipfile.js')
| -rw-r--r-- | lib/zipfile.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/zipfile.js b/lib/zipfile.js index eb6bf66..708b07a 100644 --- a/lib/zipfile.js +++ b/lib/zipfile.js @@ -3,6 +3,7 @@ var JSZip = require("jszip"); var promises = require("./promises"); exports.openArrayBuffer = openArrayBuffer; +exports.joinZipPath = joinZipPath; function openArrayBuffer(arrayBuffer) { var zipFile = new JSZip(arrayBuffer); @@ -36,3 +37,8 @@ function openArrayBuffer(arrayBuffer) { }; } +function joinZipPath(first, second) { + // In general, we should check first and second for trailing and leading slashes, + // but in our specific case this seems to be sufficient + return first + "/" + second; +} |
