|
@@ -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
|