Ejemplo n.º 1
0
 manifest = checkedCall(fs.readFile, addonPath).then(function(buff) {
   var zip = new AdmZip(buff);
   if (!zip.getEntry('install.rdf')) {
     throw new AddonFormatError(
         'Could not find install.rdf in ' + addonPath);
   }
   var done = promise.defer();
   zip.readAsTextAsync('install.rdf', done.fulfill);
   return done.promise;
 });
Ejemplo n.º 2
0
    manifest = new Promise((resolve, reject) => {
      let zip = new AdmZip(addonPath);

      if (!zip.getEntry('install.rdf')) {
        reject(new AddonFormatError(
            'Could not find install.rdf in ' + addonPath));
        return;
      }

      zip.readAsTextAsync('install.rdf', resolve);
    });