diff options
-rw-r--r-- | sal/osl/unx/uunxapi.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index 866cef2a8593..316f75a3bae1 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -272,8 +272,7 @@ int open_c(const char *cpPath, int oflag, int mode) // scoped bookmark for it so that we can access the file in // the future, too. (For the "Recent Files" functionality.) const char *sandbox = [NSHomeDirectory() UTF8String]; - if (!(strlen(cpPath) > strlen(sandbox) && - memcmp(sandbox, cpPath, strlen(sandbox)) == 0 && + if (!(strncmp(sandbox, cpPath, strlen(sandbox)) == 0 && cpPath[strlen(sandbox)] == '/')) { NSURL *url = [NSURL fileURLWithPath:[NSString stringWithUTF8String:cpPath]]; |