Browse Source

【编辑工具】安全 - 导出地址调整

lizhe 1 year ago
parent
commit
d512ab5f34

+ 3 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -1310,7 +1310,9 @@ let LOCKED_KEY  = "locked"
                         let document = CPDFDocument(url: self.document?.documentURL)
                         if document != nil {
                             document!.setDocumentAttributes(attribute)
-                            let success = document!.write(to: url, withOptions: options)
+                            
+                            let path = fileURL.path.stringByAppendingPathComponent(url.lastPathComponent)
+                            let success = document!.write(to: NSURL(fileURLWithPath: path) as URL, withOptions: options)
                             if success {
                                 self.view.window?.endSheet((self.currentWindowController.window)!)
                                 self.currentWindowController = nil