|
@@ -289,10 +289,11 @@ extension KMCompareView {
|
|
|
let document: PDFDocument = PDFDocument.init(url: NSURL(fileURLWithPath: filePath) as URL) ?? PDFDocument()
|
|
|
let cDocument: CPDFDocument = CPDFDocument.init(url: NSURL(fileURLWithPath: filePath) as URL)!
|
|
|
let file: KMFileAttribute = KMFileAttribute()
|
|
|
- file.pdfDocument = cDocument
|
|
|
- file.myPDFDocument = document
|
|
|
- file.filePath = filePath
|
|
|
+// file.pdfDocument = cDocument
|
|
|
+// file.myPDFDocument = document
|
|
|
file.password = password
|
|
|
+ file.filePath = filePath
|
|
|
+
|
|
|
|
|
|
document.unlock(withPassword: password)
|
|
|
cDocument.unlock(withPassword: password)
|
|
@@ -771,7 +772,9 @@ extension KMCompareView {
|
|
|
// }
|
|
|
|
|
|
self.updateDocument(filePath: filePath, isNew: isNew) { [unowned self] file in
|
|
|
- self.addFilePath(filePath: filePath, isNew: isNew, password: file?.password ?? "")
|
|
|
+ if let _ = file {
|
|
|
+ self.addFilePath(filePath: filePath, isNew: isNew, password: file?.password ?? "")
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|