mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-03 23:04:49 -04:00
run: Ignore leftover eol-rebase data dir symlink
If the current app data dir is removed, flatpak would try to migrate the
symlink that it had previously created, creating a symlink loop.
Fixes: #5668
(cherry picked from commit d900529a24)
This commit is contained in:
committed by
Simon McVittie
parent
3f996dd822
commit
46efefbf44
@@ -4386,6 +4386,12 @@ flatpak_run_app (FlatpakDecomposed *app_ref,
|
||||
{
|
||||
do_migrate = FALSE; /* Don't migrate older things, they are likely symlinks to this dir */
|
||||
|
||||
/* Don't migrate a symlink pointing to the new data dir. It was likely left over
|
||||
* from a previous migration and would end up pointing to itself */
|
||||
if (g_file_info_get_is_symlink (previous_app_id_dir_info) &&
|
||||
g_strcmp0 (g_file_info_get_symlink_target (previous_app_id_dir_info), app_id) == 0)
|
||||
break;
|
||||
|
||||
if (!flatpak_file_rename (previous_app_id_dir, real_app_id_dir, cancellable, &local_error))
|
||||
{
|
||||
g_warning (_("Failed to migrate old app data directory %s to new name %s: %s"),
|
||||
|
||||
Reference in New Issue
Block a user