mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 16:33:40 +02:00
gfile: Check ETag attribute is present before trying to get it
A regression from issue #2907. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2932
This commit is contained in:
@@ -89,7 +89,9 @@ calc_event_type (GFileInfo *last,
|
||||
if (last != NULL && new == NULL)
|
||||
return G_FILE_MONITOR_EVENT_DELETED;
|
||||
|
||||
if (g_strcmp0 (g_file_info_get_etag (last), g_file_info_get_etag (new)))
|
||||
if (g_file_info_has_attribute (last, G_FILE_ATTRIBUTE_ETAG_VALUE) &&
|
||||
g_file_info_has_attribute (new, G_FILE_ATTRIBUTE_ETAG_VALUE) &&
|
||||
g_strcmp0 (g_file_info_get_etag (last), g_file_info_get_etag (new)) != 0)
|
||||
return G_FILE_MONITOR_EVENT_CHANGED;
|
||||
|
||||
if (g_file_info_get_size (last) != g_file_info_get_size (new))
|
||||
|
Reference in New Issue
Block a user