From 41faeeab7bd5fd0d221ca49fc862e90f196044f6 Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Wed, 6 Mar 2024 18:23:15 +0100 Subject: [PATCH] glocalfileinfo: Set standard::type on Windows if stat failed Not sure if that should be done on UNIX too --- gio/glocalfileinfo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index 40ba4c44d..e106465c4 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -2045,6 +2045,10 @@ _g_local_file_info_get (const char *basename, if (attributes_set) { + g_file_info_set_file_type (info, + (attributes & FILE_ATTRIBUTE_DIRECTORY) ? + G_FILE_TYPE_DIRECTORY : G_FILE_TYPE_REGULAR); + g_file_info_set_is_hidden (info, (attributes & FILE_ATTRIBUTE_HIDDEN)); _g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_IS_ARCHIVE,