[epiphany] Skip file monitor events for files not matching in name (.wkdownloads)



commit e0d994b8fd2fe7f742926e08cc89e0c9f53e57e1
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Fri May 10 20:40:59 2019 +0200

    Skip file monitor events for files not matching in name (.wkdownloads)
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/765

 embed/ephy-download.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index c70570157..92ec830de 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -743,6 +743,10 @@ download_file_monitor_changed (GFileMonitor      *monitor,
                                GFileMonitorEvent  event_type,
                                EphyDownload      *download)
 {
+  /* Skip messages for <file>.wkdownload */
+  if (strcmp (g_file_get_uri (file), webkit_download_get_destination (download->download)) != 0)
+    return;
+
   if (event_type == G_FILE_MONITOR_EVENT_DELETED || event_type == G_FILE_MONITOR_EVENT_MOVED)
     g_signal_emit (download, signals[MOVED], 0);
 }


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