Zip
Zip copied to clipboard
Unable to unzip the following file
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.
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
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 reachedquickUnzipFile(_ path: URL, progress: ((_ progress: Double) -> ())?) throws -> URL
. - After calling of
try self.unzipFile(path, destination: destinationUrl, overwrite: true, password: nil, progress: progress)
, (inZip.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.
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 , @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