From 3850a71ee5a3c2002c4c36ed665e97bd9b7efae8 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 29 Apr 2024 09:24:57 +0800 Subject: [PATCH] Use an explicit path for sys.executable. --- {{ cookiecutter.format }}/src/bootstrap/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{ cookiecutter.format }}/src/bootstrap/main.c b/{{ cookiecutter.format }}/src/bootstrap/main.c index d1f735c..2767f4e 100644 --- a/{{ cookiecutter.format }}/src/bootstrap/main.c +++ b/{{ cookiecutter.format }}/src/bootstrap/main.c @@ -61,8 +61,8 @@ int main(int argc, char *argv[]) { } PyMem_RawFree(wtmp_str); - // Set the executable name to match argv[0] - status = PyConfig_SetBytesString(&config, &config.executable, argv[0]); + // Set the executable to match the known path of the app binary in the flatpak. + status = PyConfig_SetBytesString(&config, &config.executable, "/app/bin/{{ cookiecutter.app_name }}"); if (PyStatus_Exception(status)) { // crash_dialog("Unable to set executable name: %s", status.err_msg); PyConfig_Clear(&config);