Revert "glocalfileinfo: Only return file mode, not type, as UNIX_MODE attribute"

This reverts commit bfdc5fc4fc84ef8518d2d1a328c8482cf5a38e98.

This changes the semantics of G_FILE_ATTRIBUTE_ID_UNIX_MODE, and we've
already found one user of the previous semantics (ostree).

Closes #1934
This commit is contained in:
Iain Lane 2019-11-21 10:31:43 +00:00
parent a0d5b49ef7
commit e330a99f7a
No known key found for this signature in database
GPG Key ID: E352D5C51C5041D4

View File

@ -987,7 +987,7 @@ set_info_from_stat (GFileInfo *info,
/* Mostly pointless on Windows. /* Mostly pointless on Windows.
* Still, it allows for S_ISREG/S_ISDIR and IWRITE (read-only) checks. * Still, it allows for S_ISREG/S_ISDIR and IWRITE (read-only) checks.
*/ */
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_MODE, statbuf->st_mode & ~S_IFMT); _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_MODE, statbuf->st_mode);
#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE) #if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_BLOCK_SIZE, statbuf->st_blksize); _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_BLOCK_SIZE, statbuf->st_blksize);
#endif #endif