Skip to content

Commit 2d0ec03

Browse files
fippojleyba
authored andcommitted
do not compress firefox profile data
zip files created for transfer to a remote WebDriver server are no longer compressed. If the zip contained a file that was already compressed, the server would return an "invalid code lengths set" error. fixes #1884 Signed-off-by: Jason Leyba <[email protected]>
1 parent db5cbb0 commit 2d0ec03

File tree

1 file changed

+4
-1
lines changed
  • javascript/node/selenium-webdriver/firefox

1 file changed

+4
-1
lines changed

javascript/node/selenium-webdriver/firefox/profile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,10 @@ class Profile {
385385
var zip = new AdmZip();
386386
zip.addLocalFolder(dir, '');
387387
// Stored compression, see https://en.wikipedia.org/wiki/Zip_(file_format)
388-
zip.getEntries()[0].header.method = 0;
388+
zip.getEntries().forEach(function(entry) {
389+
entry.header.method = 0;
390+
});
391+
389392
return io.tmpFile().then(function(file) {
390393
zip.writeZip(file); // Sync! Why oh why :-(
391394
return promise.checkedNodeCall(fs.readFile, file);

0 commit comments

Comments
 (0)