diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-09-13 10:51:22 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-09-13 10:51:22 +0000 |
commit | f3597ab55cf7b2313056353e89d90aa1e8d6fbc4 (patch) | |
tree | f32ae46ab7572d4c8d2e907ffbc78a75a00a1916 /desktop | |
parent | 13d03ef67b01d0ae277bfaf0b1b08a2a8dbd4e25 (diff) |
INTEGRATION: CWS jl45_SRC680 (1.11.142); FILE MERGED
2006/09/07 12:35:02 jl 1.11.142.1: #i69354 package manager pipe name did not match the pipe name used by office
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/misc/dp_misc.cxx | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 889f761ad850..f1c6fce79f90 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -4,9 +4,9 @@ * * $RCSfile: dp_misc.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: hr $ $Date: 2006-01-26 17:49:07 $ + * last change: $Author: obo $ $Date: 2006-09-13 11:51:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,6 +39,7 @@ #include "rtl/digest.h" #include "rtl/random.h" #include "rtl/bootstrap.hxx" +#include "unotools/bootstrap.hxx" #include "osl/file.hxx" #include "osl/pipe.hxx" #include "osl/security.hxx" @@ -99,32 +100,14 @@ struct OfficePipeId : public rtl::StaticWithInit<const OUString, OfficePipeId> { const OUString OfficePipeId::operator () () { - OUString userPath = OUSTR("${$SYSBINDIR/" SAL_CONFIGFILE("bootstrap") - ":UserInstallation}"); - ::rtl::Bootstrap::expandMacros( userPath ); - OSL_ASSERT( userPath.getLength() > 0 ); - - // normalize path: - osl::FileStatus status( FileStatusMask_FileURL ); - osl::DirectoryItem dirItem; - if (osl::DirectoryItem::get( userPath, dirItem ) - == osl::DirectoryItem::E_None && - dirItem.getFileStatus( status ) - == osl::DirectoryItem::E_None && - status.isValid( FileStatusMask_FileURL )) + OUString userPath; + ::utl::Bootstrap::PathStatus aLocateResult = + ::utl::Bootstrap::locateUserInstallation( userPath ); + if (!(aLocateResult == ::utl::Bootstrap::PATH_EXISTS || + aLocateResult == ::utl::Bootstrap::PATH_VALID)) { - // path exists: - if (osl::FileBase::getAbsoluteFileURL( - OUString(), status.getFileURL(), userPath ) - != ::osl::FileBase::E_None) - { - // but cannot be made absolute: - throw RuntimeException( - OUSTR("Cannot make absolute URL: ") + status.getFileURL(), - Reference<XInterface>() ); - } + throw Exception(OUSTR("Extension Manager: Could not obtain path for UserInstallation."), 0); } - // else invalid path, seems that user installation hasn't been written yet rtlDigest digest = rtl_digest_create( rtl_Digest_AlgorithmMD5 ); if (digest <= 0) { |