appium/appium-android-driver

Find an AdmZip alternative

scottdixon-zz opened this issue · 1 comments

Find an AdmZip alternative to zip files in the commands.pullFolder method.

commands.pullFolder = async function (remotePath) {
  let localFolder = temp.path({prefix: 'appium'});
  await this.adb.pull(remotePath, localFolder);
  // TODO: find a better alternative to the AdmZip module
  let zip = new AdmZip();
  zip.addLocalFolder(localFolder);
  return new Promise((resolve, reject) => {
    zip.toBuffer((buffer) => {
      logger.debug("Converting in-memory zip file to base64 encoded string");
      resolve(buffer.toString('base64'));
    }, (err) => {
      reject(err);
    });
  });
};

Issue moved to appium/appium #7397 via ZenHub