summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-08-25 20:51:41 +0300
committerTor Lillqvist <tml@iki.fi>2013-08-25 21:14:08 +0300
commit0aeba08d3e0ee611883fc5d415b0c87319ca31e8 (patch)
tree59a9f55cd138646ea9ee1a81514723a19d6004e9 /fpicker
parent21fbeebc8e9cd264e42e76022607851391ce3868 (diff)
Fix "Save As" when sandboxed on OS X
Change-Id: Ibe2ea21265a0bb9c4fedcef137626df2a8019116
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/aqua/SalAquaFilePicker.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm
index ffa9c9ca0168..fbae6e4d98f1 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -340,6 +340,12 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getFiles() throw( uno::
if (userDefaults != NULL &&
[url respondsToSelector:@selector(bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:)])
{
+ // In the case of "Save As" when the user has input a new
+ // file name, this call will return nil, as bookmarks can
+ // (naturally) only be created for existing file system
+ // objects. In that case, code at a much lower level, in
+ // sal, takes care of creating a bookmark when a new file
+ // has been created outside the sandbox.
NSData *data = [url bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope
includingResourceValuesForKeys:nil
relativeToURL:nil