configure.ac                               |    2 +-
 framework/source/services/autorecovery.cxx |    2 +-
 unotools/source/ucbhelper/tempfile.cxx     |   21 +++++++++++----------
 3 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 56e0a587c985f90a4a7c03d87569b513885af174
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Mon Apr 20 12:10:08 2020 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Apr 20 12:10:08 2020 +0200

    Release 6.3.5.5
    
    Change-Id: Ice77f0f92cf509107c2b070fd0c5531542d2b9aa

diff --git a/configure.ac b/configure.ac
index 9eba504f01bf..346165714241 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.3.5.4],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.5.5],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit e0ca3b6ce55edabb5319cbcdd72dec6c88f92736
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Fri Apr 17 09:03:12 2020 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Fri Apr 17 12:03:10 2020 +0200

    Fix autorecovery using wrong directory
    
    Autorecovery should save in the user profile
    int he "backup" directory. However, when that directory
    did not exist, the temp directory was used instead.
    
    Fix this, and create the requested directory if it did not exist.
    
    Change-Id: Ie298855a740932bc6e6c9f62d4b4bf1b52b80c58

diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index d58883e83fe3..cb144b14ba21 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -3445,7 +3445,7 @@ void AutoRecovery::implts_generateNewTempURL(const 
OUString&               sBack
     OUString sName(sUniqueName.makeStringAndClear());
     OUString sExtension(rInfo.Extension);
     OUString sPath(sBackupPath);
-    ::utl::TempFile aTempFile(sName, true, &sExtension, &sPath);
+    ::utl::TempFile aTempFile(sName, true, &sExtension, &sPath, true);
 
     rInfo.NewTempURL = aTempFile.GetURL();
 }
diff --git a/unotools/source/ucbhelper/tempfile.cxx 
b/unotools/source/ucbhelper/tempfile.cxx
index 9e582658bd89..745cfc5b3e6e 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -110,7 +110,7 @@ static bool ensuredir( const OUString& rUnqPath )
     return bSuccess;
 }
 
-static OUString ConstructTempDir_Impl( const OUString* pParent )
+static OUString ConstructTempDir_Impl( const OUString* pParent, bool 
bCreateParentDirs )
 {
     OUString aName;
 
@@ -131,7 +131,7 @@ static OUString ConstructTempDir_Impl( const OUString* 
pParent )
             if ( aRet[i-1] == '/' )
                 i--;
 
-            if ( DirectoryItem::get( aRet.copy(0, i), aItem ) == 
FileBase::E_None )
+            if ( DirectoryItem::get( aRet.copy(0, i), aItem ) == 
FileBase::E_None || bCreateParentDirs )
                 aName = aRet;
         }
     }
@@ -246,18 +246,19 @@ static OUString lcl_createName(
     const OUString* pParent, bool bDirectory, bool bKeep, bool bLock,
     bool bCreateParentDirs )
 {
-    OUString aName = ConstructTempDir_Impl( pParent );
+    OUString aName = ConstructTempDir_Impl( pParent, bCreateParentDirs );
     if ( bCreateParentDirs )
     {
         sal_Int32 nOffset = rLeadingChars.lastIndexOf("/");
+        OUString aDirName;
         if (-1 != nOffset)
-        {
-            OUString aDirName = aName + rLeadingChars.copy( 0, nOffset );
-            TempDirCreatedObserver observer;
-            FileBase::RC err = Directory::createPath( aDirName, &observer );
-            if ( err != FileBase::E_None && err != FileBase::E_EXIST )
-                return OUString();
-        }
+            aDirName = aName + rLeadingChars.copy( 0, nOffset );
+        else
+            aDirName = aName;
+        TempDirCreatedObserver observer;
+        FileBase::RC err = Directory::createPath( aDirName, &observer );
+        if ( err != FileBase::E_None && err != FileBase::E_EXIST )
+            return OUString();
     }
     aName += rLeadingChars;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to