Uncompressing a ZIP file despite CRC errors

41

Cygwin's zip has the command line switches -F and -FF. They can be used if some portions of the archive are missing.

Use zip -F broken_archive -F --out fixed_archive.zip to create a new ZIP file that contains the same files with hard-fixed CRC, then extract the usual way from the new archive

Share:
41

Related videos on Youtube

mcDoggyKiip
Author by

mcDoggyKiip

Updated on September 18, 2022

Comments

  • mcDoggyKiip
    mcDoggyKiip over 1 year

    i am trying to send a mail on a named queue (registration.user) as soon as a new user registers in my laravel (5.7) application.

    i have created a mailable and a job, the job is dispatched and is working fine util the queue starts running. the job is throwing an error and the stacktrace is pushed in the failed jobs table.

    the job is as following:

    <?php
    
    namespace App\Jobs;
    
    use App\Mail\testMail;
    use App\User;
    use Illuminate\Bus\Queueable;
    use Illuminate\Queue\SerializesModels;
    use Illuminate\Queue\InteractsWithQueue;
    use Illuminate\Contracts\Queue\ShouldQueue;
    use Illuminate\Foundation\Bus\Dispatchable;
    use Illuminate\Support\Facades\Mail;
    
    class SendRegistrationMailJob implements ShouldQueue
    {
        use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
    
        /**
         * @var User
         */
        private $user;
    
        /**
         * Create a new job instance.
         *
         * @param User $user
         */
        public function __construct(User $user)
        {
            $this->user = $user;
        }
    
        /**
         * Execute the job.
         *
         * @return void
         */
        public function handle()
        {
            Mail::to($this->user->getAttribute('email'))->send(new testMail());
        }
    }
    

    stacktrace (pastebin) (~ is where the project is)

  • usr-local-ΕΨΗΕΛΩΝ
    usr-local-ΕΨΗΕΛΩΝ over 11 years
    Just one question: supposing Cygwin emulates GNU/Linux and "man unzip" reports no -F -FF flags, how am I supposed to use them in Windows? By the way, I have Linux too and I can open files from there. Any advice?
  • usr-local-ΕΨΗΕΛΩΝ
    usr-local-ΕΨΗΕΛΩΝ over 11 years
    It looked working just fine. I wasn't lucky: video crashes in the middle but this answer the question anyway
  • Karan
    Karan over 11 years
    @djechelon: WinRAR has a Keep broken files extraction option as well.