mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
glocalfileinfo: Ensure that is-backup is always set
Currently, the `G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP` attribute is set only when its value is `TRUE`. This is wrong with the latest changes as the `GLib-GIO-CRITICAL **: 00:54:07.260: GFileInfo created without standard::is-backup` errors are printed now from the `g_file_info_get_is_backup` function among others. Let's set this aattribute also when it is `FALSE`. Related: https://gitlab.gnome.org/GNOME/glib/-/issues/2934
This commit is contained in:
parent
e75ba524fd
commit
448a163bee
@ -2049,9 +2049,10 @@ _g_local_file_info_get (const char *basename,
|
||||
file_is_hidden (path, basename))));
|
||||
}
|
||||
|
||||
if (basename != NULL && basename[strlen (basename) -1] == '~' &&
|
||||
(stat_ok && S_ISREG (_g_stat_mode (&statbuf))))
|
||||
_g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_STANDARD_IS_BACKUP, TRUE);
|
||||
_g_file_info_set_attribute_boolean_by_id (info,
|
||||
G_FILE_ATTRIBUTE_ID_STANDARD_IS_BACKUP,
|
||||
basename != NULL && basename[strlen (basename) - 1] == '~' &&
|
||||
(stat_ok && S_ISREG (_g_stat_mode (&statbuf))));
|
||||
#else
|
||||
if (statbuf.attributes & FILE_ATTRIBUTE_HIDDEN)
|
||||
g_file_info_set_is_hidden (info, TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user