From 140ef318ce03659c5fc6aacd0f8f5366947be827 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 11 Aug 2020 09:54:31 +0530 Subject: [PATCH] Fix accidental re-execing for calibre_parallel as well on macOS --- bypy/macos/launcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bypy/macos/launcher.c b/bypy/macos/launcher.c index 1cd0a77fe7..165b11c303 100644 --- a/bypy/macos/launcher.c +++ b/bypy/macos/launcher.c @@ -19,7 +19,7 @@ main(int argc, char * const *argv) { if (path == NULL) fatal("failed to get realpath for executable path with error: %s", strerror(errno)); // We re-exec using an absolute path because the Qt WebEngine sandbox does not work // when running via symlink - if (!IS_GUI && strcmp(PROGRAM, "calibre-parallel") != 0 && strcmp(argv[0], path) != 0) { + if (!IS_GUI && wcscmp(PROGRAM, L"calibre-parallel") != 0 && strcmp(argv[0], path) != 0) { char* new_argv[1024] = {0}; new_argv[0] = path; for (int i = 1; i < argc && i < arraysz(new_argv) - 1; i++) new_argv[i] = argv[i];