macOS: Detect app translocation and bail out if translocated
This commit is contained in:
@@ -426,6 +426,10 @@ pc_init(int argc, char *argv[])
|
|||||||
p = path_get_filename(exe_path);
|
p = path_get_filename(exe_path);
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
if (!strncmp(exe_path, "/private/var/folders/", 21)) {
|
||||||
|
ui_msgbox_header(MBX_FATAL, L"App Translocation", EMU_NAME_W L" cannot determine the emulated machine's location due to a macOS security feature. Please make a copy of the " EMU_NAME_W L" app and open that copy instead.");
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
#elif !defined(_WIN32)
|
#elif !defined(_WIN32)
|
||||||
/* Grab the actual path if we are an AppImage. */
|
/* Grab the actual path if we are an AppImage. */
|
||||||
p = getenv("APPIMAGE");
|
p = getenv("APPIMAGE");
|
||||||
|
Reference in New Issue
Block a user