sal/osl/unx/uunxapi.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 05e037a9f104bba0749bd3c75d36ba581ea663cf Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jul 1 09:56:21 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Jul 2 10:21:57 2022 +0200 fix --enable-macosx-sandbox build after commit eecc113e6f6e51e5e37059235c1069dc9c4c1cc8 Date: Sat May 21 08:30:29 2022 +0200 rtl_String->OString in sal Change-Id: I1b71858ae39ae3551a281b0fa5c47652f5bc1b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index 0aff1e469e04..5311bc71917f 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -363,7 +363,7 @@ int osl::mkdir(const OString& path, mode_t mode) int open_c(const OString& path, int oflag, int mode) { - accessFilePathState *state = prepare_to_access_file_path(cpPath); + accessFilePathState *state = prepare_to_access_file_path(path.getStr()); int result = open(path.getStr(), oflag, mode); int saved_errno = errno; @@ -382,9 +382,10 @@ int open_c(const OString& path, 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 (!(strncmp(sandbox, cpPath, strlen(sandbox)) == 0 && - cpPath[strlen(sandbox)] == '/')) + if (!(strncmp(sandbox, path.getStr(), strlen(sandbox)) == 0 && + path[strlen(sandbox)] == '/')) { + auto cpPath = path.getStr(); NSURL *url = [NSURL fileURLWithPath:[NSString stringWithUTF8String:cpPath]]; NSData *data = [url bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope includingResourceValuesForKeys:nil @@ -399,7 +400,7 @@ int open_c(const OString& path, int oflag, int mode) } #endif - done_accessing_file_path(path, state); + done_accessing_file_path(path.getStr(), state); errno = saved_errno;