1
0
mirror of https://gitlab.gnome.org/GNOME/nautilus synced 2024-06-30 23:46:35 +00:00

Merge branch 'show-script-context-menu' into 'main'

script: add scripts to context menu in flatpak

Closes #3477

See merge request GNOME/nautilus!1543
This commit is contained in:
Anuraag Reddy Patllollu 2024-06-23 14:08:53 +00:00
commit 73371ee071

View File

@ -125,7 +125,16 @@ nautilus_get_user_directory (void)
char *
nautilus_get_scripts_directory_path (void)
{
return g_build_filename (g_get_user_data_dir (), "nautilus", "scripts", NULL);
if (nautilus_application_is_sandboxed ())
{
/* g_get_user_data_dir() leads to a different path then expected under
* the flatpak sandbox */
return g_build_filename (g_get_home_dir (), ".local", "share", "nautilus", "scripts", NULL);
}
else
{
return g_build_filename (g_get_user_data_dir (), "nautilus", "scripts", NULL);
}
}
char *