Kaydet (Commit) fd41fb83 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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
üst cc8cd28f
......@@ -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() )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment