diff options
author | Philipp Lohmann <pl@openoffice.org> | 2002-07-10 10:48:46 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2002-07-10 10:48:46 +0000 |
commit | 6c4463948d2a7330e9455aa5015711a8ecf1104b (patch) | |
tree | 7c8bf12efd647f5a1b0ac487794e96f8544c5985 /psprint | |
parent | 19afd9ca8bdc7422edcab0db5e02cb5819b5da74 (diff) |
#101135# convert paths correctly
Diffstat (limited to 'psprint')
-rw-r--r-- | psprint/source/helper/helper.cxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/psprint/source/helper/helper.cxx b/psprint/source/helper/helper.cxx index e26d9dcf8398..db89f96025f6 100644 --- a/psprint/source/helper/helper.cxx +++ b/psprint/source/helper/helper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: helper.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: pl $ $Date: 2002-05-31 11:30:32 $ + * last change: $Author: pl $ $Date: 2002-07-10 11:48:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,18 +85,26 @@ static const ::rtl::OUString& getOfficePath( enum whichOfficePath ePath ) if( ! bOnce ) { bOnce = true; - ::rtl::OUString aIni; + rtl::OUString aIni; osl_getExecutableFile( &aIni.pData ); aIni = aIni.copy( 0, aIni.lastIndexOf( '/' )+1 ); - aIni += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_CONFIGFILE( "bootstrap" ) ) ); - ::rtl::Bootstrap aBootstrap( aIni ); + aIni += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_CONFIGFILE( "bootstrap" ) ) ); + rtl::Bootstrap aBootstrap( aIni ); aBootstrap.getFrom( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseInstallation" ) ), aNetPath ); aBootstrap.getFrom( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserInstallation" ) ), aUserPath ); if( ! aNetPath.compareToAscii( "file://", 7 ) ) - aNetPath = aNetPath.copy( 7 ); + { + rtl::OUString aSysPath; + if( osl_getSystemPathFromFileURL( aNetPath.pData, &aSysPath.pData ) == osl_File_E_None ) + aNetPath = aSysPath; + } if( ! aUserPath.compareToAscii( "file://", 7 ) ) - aUserPath = aUserPath.copy( 7 ); + { + rtl::OUString aSysPath; + if( osl_getSystemPathFromFileURL( aUserPath.pData, &aSysPath.pData ) == osl_File_E_None ) + aUserPath = aSysPath; + } } switch( ePath ) |