Zip icon indicating copy to clipboard operation
Zip copied to clipboard

Unable to unzip the following file

Open AhmadFayyas opened this issue 7 years ago • 4 comments

I have the following file (which is a .doc zipped file): https://drive.google.com/file/d/0B77zupnViflLTmZBdTliRjI1a00/view

I am unable to unzip it and can't find what is the reason.

Note that on the macOS, I am able to unzip it, via UnRAR Unarchiver - Zip, Rar Extractor,Expander.

Please advise.

AhmadFayyas avatar Mar 21 '17 15:03 AhmadFayyas

Hi Ahmed, the link you supplied is private. Also, how do you zip the file in the first place ?

And when you say unable to unzip it, what happens exactly ?, like what is expected to happen but doesn't and what happens instead ? any errors and code snippets will help too

mostafaberg avatar Mar 29 '17 17:03 mostafaberg

Hello, Sorry for the providing a private link, it should be public on the web now. FYI, The archived file contains a document file in Arabic language.

Remark: you can also unarchive it via Google ZIP Extractor.

How to reproduce:

I called -in my view controller- try Zip.quickUnzipFile(filePath), after that I tried to do some debugging:

  • In QuickZip file I reached quickUnzipFile(_ path: URL, progress: ((_ progress: Double) -> ())?) throws -> URL.
  • After calling of try self.unzipFile(path, destination: destinationUrl, overwrite: true, password: nil, progress: progress), (in Zip.swift file), when reaching -Specifically at line 121- :
 if unzGoToFirstFile(zip) != UNZ_OK {
            throw ZipError.unzipFail
        }

It throws:

error unzipFail error.localizedDescription String "The operation couldn’t be completed. (Zip.ZipError error 1.)"

The used engine for archiving the file is: XCEED 6.2, zipwriter.

AhmadFayyas avatar Apr 03 '17 12:04 AhmadFayyas

Did you find the solution of this problem? I am facing the same issue while unzipping a zipped file. In my case: Zip.quickUnzipFile(url)

returns:

Error: The operation couldn't be completed. (Zip.ZipError error 1.)

usamaaftab80 avatar May 31 '18 21:05 usamaaftab80

@usamaaftab80 , @AhmadFayyas You can't write to bundle because it is in the app resources directory and you have to create it in the document directory to write to it...

https://stackoverflow.com/a/37580536/4116685

qasimsina avatar Jun 13 '18 07:06 qasimsina