Mercurial > dwindows
comparison gtk/dw.c @ 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 | 663467f6eee4 |
comparison
equal
deleted
inserted
replaced
2117:37060de79102 | 2118:c3f088266bcd |
---|---|
12383 vsnprintf(outbuf, 1024, description, args); | 12383 vsnprintf(outbuf, 1024, description, args); |
12384 va_end(args); | 12384 va_end(args); |
12385 | 12385 |
12386 g_notification_set_body(notification, outbuf); | 12386 g_notification_set_body(notification, outbuf); |
12387 } | 12387 } |
12388 /* check if we can read from this file (it exists and read permission) */ | 12388 if(imagepath) |
12389 if(imagepath && access(imagepath, 04 ) != 0) | |
12390 { | 12389 { |
12391 GFile *file = g_file_new_for_path(imagepath); | 12390 GFile *file = g_file_new_for_path(imagepath); |
12392 GBytes *bytes = g_file_load_bytes(file, NULL, NULL, NULL); | 12391 GBytes *bytes = g_file_load_bytes(file, NULL, NULL, NULL); |
12393 | 12392 |
12394 if(bytes) | 12393 if(bytes) |