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

Compare commits

...

3 Commits

Author SHA1 Message Date
Anuraag Reddy Patllollu
73371ee071 Merge branch 'show-script-context-menu' into 'main'
script: add scripts to context menu in flatpak

Closes #3477

See merge request GNOME/nautilus!1543
2024-06-23 14:08:53 +00:00
Martin
58450f8f22 Update Slovenian translation 2024-06-23 13:13:23 +00:00
Anuraag Reddy Patllollu
ec6c02a053 file-utilities: add scripts to context menu in flatpak
The g_get_user_data_dir() function fetches the data directory without
considering if Nautilus is running in a sandbox or not. This results in
an incorrect path under the flapak sandbox, making scripts inaccessible.
We fix this by checking whether nautilus is sandboxed and adjust the
path accordingly

Fixes #3477
2024-06-19 11:06:44 -04:00
2 changed files with 245 additions and 235 deletions

469
po/sl.po

File diff suppressed because it is too large Load Diff

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 *