diff options
Diffstat (limited to 'idlc/source/idlcproduce.cxx')
-rw-r--r-- | idlc/source/idlcproduce.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx index e66bc9229a43..60c5ff463045 100644 --- a/idlc/source/idlcproduce.cxx +++ b/idlc/source/idlcproduce.cxx @@ -51,10 +51,9 @@ static bool checkOutputPath(const OString& completeName) sal_Int32 nIndex = 0; OString token(sysPathName.getToken(0, SEPARATOR, nIndex)); - const sal_Char* p = token.getStr(); - if (strcmp(p, "..") == 0 - || *(p+1) == ':' - || strcmp(p, ".") == 0) + if (token.startsWith("..") + || (token.getLength() >= 2 && token[1] == ':') + || token.startsWith(".")) { buffer.append(token); buffer.append(SEPARATOR); |