summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-10-11 17:00:29 +0300
committerTor Lillqvist <tml@collabora.com>2018-10-11 17:06:15 +0300
commitfd41fb8392a4e9a27d9fd09071a5f1e2be4b5a0e (patch)
tree42774f4a90fd5de336fa9d2b92e5ddad5f5a857b /unotools
parentcc8cd28f4f66444f8e77c350c5dc64e2dc70af17 (diff)
On iOS, don't create temp files in the folder where a document being edited is
That folder typically is not inside the app sandbox, and the process has access only to the one file that they have selected for editing there. Trying to create other files in that folder is doomed to fail. Change-Id: Ib4ff5c7c60aa372eb412e87dc8bbce48ec6d6b54
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 9b8d7a957c2d..c600a59f5be8 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -118,6 +118,10 @@ static bool ensuredir( const OUString& rUnqPath )
static OUString ConstructTempDir_Impl( const OUString* pParent )
{
OUString aName;
+
+ // Ignore pParent on iOS. We don't want to create any temp files
+ // in the same directory where the document being edited is.
+#ifndef IOS
if ( pParent && !pParent->isEmpty() )
{
// test for valid filename
@@ -136,6 +140,9 @@ static OUString ConstructTempDir_Impl( const OUString* pParent )
aName = aRet;
}
}
+#else
+ (void) pParent;
+#endif
if ( aName.isEmpty() )
{