Skip to content

Commit

Permalink
rewrite-launchers: Fix symbolic link name
Browse files Browse the repository at this point in the history
  • Loading branch information
mwleeds committed Mar 19, 2022
1 parent ba061e2 commit 3867a10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rewrite-launchers.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ migrate_renamed_app_launchers (void)
else /* renamed_to != NULL */
{
g_autoptr(GFile) link_file = NULL;
g_autoptr(GFile) new_link_file = NULL;
g_autoptr(GString) data_string = NULL;
g_autoptr(GKeyFile) new_key_file = NULL;
g_autofree char *new_desktop = NULL;
Expand Down Expand Up @@ -234,7 +235,8 @@ migrate_renamed_app_launchers (void)
link_file = g_file_new_for_path (link_path);
relative_path = g_build_filename ("..", XDG_PORTAL_APPLICATIONS_DIR, new_desktop, NULL);
g_file_delete (link_file, NULL, NULL);
if (!g_file_make_symbolic_link (link_file, relative_path, NULL, &error))
new_link_file = g_file_new_build_filename (g_get_user_data_dir (), "applications", new_desktop, NULL);
if (!g_file_make_symbolic_link (new_link_file, relative_path, NULL, &error))
{
g_warning ("Unable to rename desktop file link %s -> %s: %s",
desktop_name, new_desktop, error->message);
Expand Down

0 comments on commit 3867a10

Please sign in to comment.