Browse Source

【首页-合并】文档添加到列表,再从finder中删除这些文档,合并直接崩溃 -- 优化

lizhe 10 months ago
parent
commit
4f9a347c27

+ 4 - 0
PDF Office/PDF Master/Class/PDFTools/Merge/MergeNew/KMMergeWindowController.swift

@@ -180,6 +180,10 @@ extension KMMergeWindowController {
             /*防止文件被地址变换后crash*/
             guard let tDocument = PDFDocument(url: NSURL(fileURLWithPath: file.filePath) as URL) else {
                 print("文件不存在")
+                let alert = NSAlert.init()
+                alert.alertStyle = .critical
+                alert.messageText = "\(file.filePath.lastPathComponent) + \(NSLocalizedString("Failed to merge!", comment: ""))"
+                alert.runModal()
                 return
             }