summaryrefslogtreecommitdiff
path: root/codemaker/source/codemaker/global.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'codemaker/source/codemaker/global.cxx')
-rw-r--r--codemaker/source/codemaker/global.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index ba3f42484d5a..54ceeb1dc8bd 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -87,11 +87,8 @@ OString createFileNameFromType( const OString& destination,
length += prefix.getLength() + type.getLength() + postfix.getLength();
sal_Bool withSeparator = sal_False;
- if (!destination.isEmpty() &&
- destination[destination.getLength() - 1] != '\\' &&
- destination[destination.getLength() - 1] != '/' &&
- type[0] != '\\' &&
- type[0] != '/')
+ if (!(destination.endsWith("\\") || destination.endsWith("/"))
+ && !(type.startsWith("\\") || type.startsWith("/")))
{
length++;
withSeparator = sal_True;