diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-07-07 15:23:58 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-07-07 15:23:58 +0000 |
commit | a47fbfe1653a6df930c03b196c12ec837ef7db9a (patch) | |
tree | f2ec27812e150bc988c5ebb1582a0b2c56466090 /setup_native | |
parent | f52e5042ba2f0eeb04a551b0de573667ec53cb16 (diff) |
INTEGRATION: CWS native161 (1.3.16); FILE MERGED
2008/06/18 10:02:24 sb 1.3.16.1: #i90749# make sure paths stored in ure-link and basis-link files do not end in a final backslash
Diffstat (limited to 'setup_native')
-rw-r--r-- | setup_native/source/win32/customactions/shellextensions/layerlinks.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx index af52680014e4..897fb5999f8f 100644 --- a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx +++ b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: layerlinks.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -87,6 +87,16 @@ namespace { MsiSetProperty(handle, sProperty.c_str(), TEXT("1")); } + + void stripFinalBackslash(std::string * path) { + std::string::size_type i = path->size(); + if (i > 1) { + --i; + if ((*path)[i] == '\\') { + path->erase(i); + } + } + } } // namespace extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) @@ -113,6 +123,9 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) sUreInstallPath = TEXT("..\\URE"); } + stripFinalBackslash(&sBasisInstallPath); + stripFinalBackslash(&sUreInstallPath); + // string myText1 = TEXT("Creating Basis-Link: ") + sBasisLinkPath; // string myText2 = TEXT("Creating Ure-Link: ") + sUreLinkPath; // MessageBox(NULL, myText1.c_str(), "DEBUG", MB_OK); |