Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easy zip throws error when folder size is bigger than ~20mb #1

Open
soliton4 opened this issue Jul 28, 2013 · 4 comments
Open

easy zip throws error when folder size is bigger than ~20mb #1

soliton4 opened this issue Jul 28, 2013 · 4 comments

Comments

@soliton4
Copy link

hi
i tried including easy zip in my node-mirror project.
https://npmjs.org/package/node-mirror

the main reason for me was because it seems to be the only zip implementation that handles folder reads async.
however when i try zipping a folder that is about 40mb big, easyzip wont finish and i get a error on command line

events.js:72
throw er; // Unhandled 'error' event

i am pretty sure you can reproduce it. just try to zip a folder that has lots of files and is about 40 mb in size.
thx
sol

@dieseltravis
Copy link

I'm having a similar issue:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: OK, open 'D:\somedir\etc\filename.txt'

The code that I'm using is:

async.series([
  function (as1_callback) {
    fse.exists('./somedir', function (exists) {
      if (exists) {
        var ez = new EasyZip(),
          zipFileName = 'backup-' + moment(env.now).format('YYYYMMDD-HHmm') + '.zip';
        console.log('zipping up existing files into ' + zipFileName + '...');
        try {
debugger; // as far as I can tell this next line is where the error happens...
          ez.zipFolder('./somedir', function () {
            try {
              console.log('writing zip to disk...');
              ez.writeToFile('./otherdir/' + zipFileName));
              as1_callback(null);
            } catch (err2) {
              handleError(err2, 'EasyZip nested task');
              as1_callback(null);
            }
          });
        } catch (err) {
          handleError(err, 'EasyZip task');
          as1_callback(null);
        }
      } else {
        console.log('skipping zip...');
        as1_callback(null);
      }
    });
  }, // etc...

This code was working fine before when the directory to sip only had a few files in it. Now the folder is up to 5.29 MB and contains 4,435 files and 3,576 folders.

@soliton4
Copy link
Author

im using https://www.npmjs.org/package/adm-zip now.
easy zip seems to be unmaintained ;(

@dieseltravis
Copy link

Cool, I was just looking into alternatives, thanks for the tip! 👍

@jrnewell
Copy link

In case anyone is interested, I made a fork of this repo since this one is abandoned. https://github.com/jrnewell/easy-zip2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants