changeset 2118:c3f088266bcd

GTK: Remove access() test for the image file in dw_notiication_new(). This test was sometimes failing incorrectly, and since we switched to using g_file_load_bytes() the test is no longer required.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 23 Jun 2020 21:36:54 +0000
parents 37060de79102
children 34963d1e6f62
files gtk/dw.c gtk3/dw.c
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Tue Jun 23 09:37:37 2020 +0000
+++ b/gtk/dw.c	Tue Jun 23 21:36:54 2020 +0000
@@ -12385,8 +12385,7 @@
 
          g_notification_set_body(notification, outbuf);
       }
-      /* check if we can read from this file (it exists and read permission) */
-      if(imagepath && access(imagepath, 04 ) != 0)
+      if(imagepath)
       {
          GFile *file = g_file_new_for_path(imagepath);
          GBytes *bytes = g_file_load_bytes(file, NULL, NULL, NULL);
--- a/gtk3/dw.c	Tue Jun 23 09:37:37 2020 +0000
+++ b/gtk3/dw.c	Tue Jun 23 21:36:54 2020 +0000
@@ -11090,8 +11090,7 @@
 
          g_notification_set_body(notification, outbuf);
       }
-      /* check if we can read from this file (it exists and read permission) */
-      if(imagepath && access(imagepath, 04 ) != 0)
+      if(imagepath)
       {
          GFile *file = g_file_new_for_path(imagepath);
          GBytes *bytes = g_file_load_bytes(file, NULL, NULL, NULL);