Git Product home page Git Product logo

Comments (9)

richardanaya avatar richardanaya commented on May 22, 2024

Here's some commandline info on fixing it ( http://ask.metafilter.com/157754/Mac-OS-X-Recovering-a-corrupted-zip-file )

Jaundiced-Outlook:Downloads Richard$ file Project.zip
Project.zip: Zip archive data, at least v1.0 to extract
Jaundiced-Outlook:Downloads Richard$ zip -F Project.zip --out ProjectFixed.zip
Fix archive (-F) - assume mostly intact archive
zip warning: bad archive - missing end signature
zip warning: (If downloaded, was binary mode used? If not, the
zip warning: archive may be scrambled and not recoverable)
zip warning: Can't use -F to fix (try -FF)

zip error: Zip file structure invalid (Project.zip)
Jaundiced-Outlook:Downloads Richard$ zip -FF Project.zip --out ProjectFixed.zip
Fix archive (-FF) - salvage what can
zip warning: Missing end (EOCDR) signature - either this archive
is not readable or the end is damaged
Is this a single-disk archive? (y/n): y
Assuming single-disk archive
Scanning for entries...
copying: Project/after.png
zip warning: no end of stream entry found: Project/after.png
zip warning: rewinding and scanning for later entries
zip warning: zip file empty
Jaundiced-Outlook:Downloads Richard$

from zip.js.

gildas-lormeau avatar gildas-lormeau commented on May 22, 2024

Thanks richardanaya for this detailed bug report!

Actually I fixed a bug related to "Data descriptor" signature recently. Did you use the latest version of zip.js?

from zip.js.

richardanaya avatar richardanaya commented on May 22, 2024

Just tried with latest git clone.

Same message and same output from zip -FF =)

from zip.js.

gildas-lormeau avatar gildas-lormeau commented on May 22, 2024

I do not see what is wrong with the end of central directory record...
Can you attach a lightweight zip file that you are not able to unzip? Are there some cases where the generated zip files can be unzipped without any issue?

EDIT: Can you also try to replace this code at line 792 of zip.js
header.view.setUint32(0, 0x0a000808);
with this one:
header.view.setUint32(0, 0x14000808);

(edit 2: changed 0x3d000808 to 0x14000808)

from zip.js.

richardanaya avatar richardanaya commented on May 22, 2024

Will do

from zip.js.

gildas-lormeau avatar gildas-lormeau commented on May 22, 2024

Thank you very much :)

That's the only way for me to know how to fix this issue...

from zip.js.

richardanaya avatar richardanaya commented on May 22, 2024

Edit! Correction, they all seem to be working!

I'm going to link a directory of tests, basically I just browse to the directory and add all the files using the "Create a zip file demo"

http://www.mediafire.com/?58dami1ka95sodi

Test 1: 1 image file
Test 2: 2 image files
Test 3: 1 .rtf file
Test 4: 4 image files

Pre-Fix
Test 1: Fails
Test 2: Succeeds
Test 3: Fails
Test 4: Succeeds

Post Fix:
Test 1: Succeeds
Test 2: Succeeds
Test 3: Succeeds
Test 4: Succeeds

from zip.js.

richardanaya avatar richardanaya commented on May 22, 2024

Whoops, guess should wait til there is a code fix =)

from zip.js.

gildas-lormeau avatar gildas-lormeau commented on May 22, 2024

Yeah, I'll push it when I'll be back at home ;)

from zip.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.