[gnome-software] trivial: Actually remove dead flatpak symlinks



commit 93367756704f7640d42d2e7c3f5705e1ad25f32c
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jun 8 20:17:50 2016 +0100

    trivial: Actually remove dead flatpak symlinks

 src/plugins/gs-flatpak-symlinks.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-flatpak-symlinks.c b/src/plugins/gs-flatpak-symlinks.c
index 3e37eaf..94bc92e 100644
--- a/src/plugins/gs-flatpak-symlinks.c
+++ b/src/plugins/gs-flatpak-symlinks.c
@@ -148,9 +148,13 @@ gs_flatpak_symlinks_check_valid (FlatpakInstallation *installation,
                g_autofree gchar *prefix_colon = g_strdup_printf ("%s:", prefix);
                g_autoptr(FlatpakRemote) xremote = NULL;
 
+               /* not interesting */
                if (!g_str_has_prefix (tmp, prefix_colon))
                        continue;
-               if (!g_file_test (tmp, G_FILE_TEST_IS_SYMLINK))
+
+               /* only a symlink */
+               fn = g_build_filename (subdir, tmp, NULL);
+               if (!g_file_test (fn, G_FILE_TEST_IS_SYMLINK))
                        continue;
 
                /* can we find a valid remote for this file */
@@ -166,7 +170,6 @@ gs_flatpak_symlinks_check_valid (FlatpakInstallation *installation,
                        g_debug ("%s remote symlink is valid", origin);
                        continue;
                }
-               fn = g_build_filename (subdir, tmp, NULL);
                g_debug ("deleting %s symlink as no longer valid", fn);
                if (!gs_utils_unlink (fn, error))
                        return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]