mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
glocalfileinfo: Use stat results only if stat succeeded
This commit is contained in:
parent
3ae88886ac
commit
2cf0ce39aa
@ -2021,11 +2021,14 @@ _g_local_file_info_get (const char *basename,
|
|||||||
_g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_IS_SYSTEM,
|
_g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_IS_SYSTEM,
|
||||||
(statbuf.attributes & FILE_ATTRIBUTE_SYSTEM));
|
(statbuf.attributes & FILE_ATTRIBUTE_SYSTEM));
|
||||||
|
|
||||||
_g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_IS_MOUNTPOINT,
|
if (stat_ok)
|
||||||
(statbuf.reparse_tag == IO_REPARSE_TAG_MOUNT_POINT));
|
{
|
||||||
|
_g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_IS_MOUNTPOINT,
|
||||||
|
(statbuf.reparse_tag == IO_REPARSE_TAG_MOUNT_POINT));
|
||||||
|
|
||||||
if (statbuf.reparse_tag != 0)
|
if (statbuf.reparse_tag != 0)
|
||||||
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_REPARSE_POINT_TAG, statbuf.reparse_tag);
|
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_REPARSE_POINT_TAG, statbuf.reparse_tag);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
symlink_target = NULL;
|
symlink_target = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user