summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-06-18 17:26:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-20 14:44:02 +0200
commit4307b6a465cd97cc0a85260cc798542b50ed0f58 (patch)
treecb9005842f9b32d8df321f6a0fa2a774a1a1a069 /vcl/unx
parentdcd7230e06134487663773fc2f45f6556f503b02 (diff)
Properly detect and remove ".bin" at end
Change-Id: I89b321d5103017aa01151bd813d5789e688b62dd
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/app/sm.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index bb55adf55387..843e0394d9fc 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -525,9 +525,8 @@ rtl::OUString SessionManagerClient::getExecName()
osl_getExecutableFile( &aExec.pData );
osl_getSystemPathFromFileURL( aExec.pData, &aSysExec.pData );
- int nPos = aSysExec.indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".bin")) );
- if( nPos != -1 )
- aSysExec = aSysExec.copy( 0, nPos );
+ if( aSysExec.endsWith(".bin") )
+ aSysExec = aSysExec.copy( 0, aSysExec.getLength() - RTL_CONSTASCII_LENGTH(".bin") );
return aSysExec;
}