daraosn / node-zip

217 stars 38 forks source link

Issue with unzip #14

Closed mdumouchel closed 9 years ago

mdumouchel commented 9 years ago

Hello everyone I'm having some issues with unziping. I can get the folder structure however I can't seem to get the files to write to disk. The zip is being uploaded to the server and I'm processing it like this

var unzip = require("unzip");

var path = __dirname + "/uploads/powerPoints/" + name.slice(0, -4);
    var unziped = unzip.Extract({ path: path });
    var zip = file.pipe(unzip.Parse());

    zip.on('entry', function (entry) {
        console.log("entry");
        console.log(entry.path);
        entry.autodrain();
    });

    zip.on('error', function(err) {
        deferred.reject(err);
    });

    zip.on('finish', function(){
        deferred.resolve(file);
    });

I created the zip on my mac. All I have is a folder with an index.html file with a little bit of text. When it writes to disk all I get is the folder without the index.html file. Any idea?

dsifford commented 9 years ago

@mdumouchel

FYI: You posted your issue in the wrong repository. The one you are looking for is https://github.com/EvanOxfeld/node-unzip , however, I should mention that it appears that this node module has been abandoned by the original developer a couple years ago.

daraosn commented 9 years ago

Hi, as @dsifford mentioned this is not the right repo for your question. I'll close this issue.