[Libreoffice-commits] core.git: desktop/source

Mike Kaganski mike.kaganski at collabora.com
Wed Feb 28 21:55:22 UTC 2018


 desktop/source/app/appinit.cxx |    7 -------
 1 file changed, 7 deletions(-)

New commits:
commit 7dc93bbf8a1fdea1a6723584c35e497cda558e85
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Wed Feb 28 11:01:55 2018 +0100

    Don't do unnecessary check for trailing slash
    
    The check is done in utl::TempFile::SetTempNameBaseDirectory
    
    Change-Id: I62b40a4f53f68da14aae6fcdfbf4c2dc7515a2c5
    Reviewed-on: https://gerrit.libreoffice.org/50501
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 2aec3928ad87..2e302be587a3 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -248,18 +248,11 @@ void Desktop::CreateTemporaryDirectory()
         throw;
     }
 
-    // set temp base directory
-    if ( aTempBaseURL.endsWith( "/" ) )
-        aTempBaseURL = aTempBaseURL.copy( 0, aTempBaseURL.getLength() - 1 );
-
     // create new current temporary directory
     OUString aTempPath = ::utl::TempFile::SetTempNameBaseDirectory( aTempBaseURL );
     if ( aTempPath.isEmpty()
          && ::osl::File::getTempDirURL( aTempBaseURL ) == osl::FileBase::E_None )
     {
-        if ( aTempBaseURL.endsWith( "/" ) )
-            aTempBaseURL = aTempBaseURL.copy( 0, aTempBaseURL.getLength() - 1 );
-
         aTempPath = ::utl::TempFile::SetTempNameBaseDirectory( aTempBaseURL );
     }
 


More information about the Libreoffice-commits mailing list