[gnome-builder/gnome-builder-3-24] flatpak: Monitor the right file after a rename event



commit 2fb139e9821a1515039ccc2c1aaca56031bb8e57
Author: Matthew Leeds <mleeds redhat com>
Date:   Thu Mar 23 17:16:38 2017 -0500

    flatpak: Monitor the right file after a rename event
    
    When you save an edited file in Builder it renames a temporary file to
    the appropriate file name, so we need to deal with that behavior
    appropriately for the GFileMonitor that watches the flatpak manifest.
    This commit fixes a bug where we were monitoring the temporary file
    rather than the actual manifest after such a rename event.

 .../flatpak/gbp-flatpak-configuration-provider.c   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-configuration-provider.c 
b/plugins/flatpak/gbp-flatpak-configuration-provider.c
index 5e60c63..6733a12 100644
--- a/plugins/flatpak/gbp-flatpak-configuration-provider.c
+++ b/plugins/flatpak/gbp-flatpak-configuration-provider.c
@@ -743,7 +743,7 @@ gbp_flatpak_configuration_provider_manifest_changed (GbpFlatpakConfigurationProv
                                        self,
                                        G_CONNECT_SWAPPED);
 
-              manifest_monitor = g_file_monitor_file (file, G_FILE_MONITOR_WATCH_MOVES, NULL, &local_error);
+              manifest_monitor = g_file_monitor_file (new_config_file, G_FILE_MONITOR_WATCH_MOVES, NULL, 
&local_error);
               if (manifest_monitor == NULL)
                 g_warning ("Error encountered trying to monitor flatpak manifest %s: %s", path, 
local_error->message);
               else


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