Mercurial > dwindows
comparison gtk3/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 |
---|---|
11088 vsnprintf(outbuf, 1024, description, args); | 11088 vsnprintf(outbuf, 1024, description, args); |
11089 va_end(args); | 11089 va_end(args); |
11090 | 11090 |
11091 g_notification_set_body(notification, outbuf); | 11091 g_notification_set_body(notification, outbuf); |
11092 } | 11092 } |
11093 /* check if we can read from this file (it exists and read permission) */ | 11093 if(imagepath) |
11094 if(imagepath && access(imagepath, 04 ) != 0) | |
11095 { | 11094 { |
11096 GFile *file = g_file_new_for_path(imagepath); | 11095 GFile *file = g_file_new_for_path(imagepath); |
11097 GBytes *bytes = g_file_load_bytes(file, NULL, NULL, NULL); | 11096 GBytes *bytes = g_file_load_bytes(file, NULL, NULL, NULL); |
11098 | 11097 |
11099 if(bytes) | 11098 if(bytes) |