|
@@ -325,10 +325,13 @@ class FileConverter : NSObject, CPDFConverterDelegate, CPDFConverterFPToolDelega
|
|
|
|
|
|
let zip = ZipArchive.init()
|
|
let zip = ZipArchive.init()
|
|
|
|
|
|
- zip.unzipOpenFile(cachePath)
|
|
|
|
- zip.unzipFile(to: self.desPath, overWrite: true)
|
|
|
|
-
|
|
|
|
- try? FileManager.default.removeItem(atPath: cachePath)
|
|
|
|
|
|
+ if (zip.unzipOpenFile(cachePath) && zip.unzipFile(to: self.desPath, overWrite: true)) {
|
|
|
|
+
|
|
|
|
+ try? FileManager.default.removeItem(atPath: cachePath)
|
|
|
|
+ }else {
|
|
|
|
+ try? FileManager.default.moveItem(atPath: cachePath,
|
|
|
|
+ toPath: self.desPath)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
if self.pdfConverter?.isConverting == true {
|
|
if self.pdfConverter?.isConverting == true {
|