mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 10:30:03 +01:00
Merge branch 'wip/iainl/fix-1934' into 'master'
Revert "glocalfileinfo: Only return file mode, not type, as UNIX_MODE attribute" Closes #1934 See merge request GNOME/glib!1241
This commit is contained in:
commit
0a469dafe4
@ -987,7 +987,7 @@ set_info_from_stat (GFileInfo *info,
|
||||
/* Mostly pointless on Windows.
|
||||
* 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)
|
||||
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_BLOCK_SIZE, statbuf->st_blksize);
|
||||
#endif
|
||||
|
@ -929,7 +929,8 @@ test_copy_preserve_mode (void)
|
||||
|
||||
dest_mode = g_file_info_get_attribute_uint32 (dest_info, G_FILE_ATTRIBUTE_UNIX_MODE);
|
||||
|
||||
g_assert_cmpint (dest_mode, ==, vectors[i].expected_destination_mode);
|
||||
g_assert_cmpint (dest_mode & ~S_IFMT, ==, vectors[i].expected_destination_mode);
|
||||
g_assert_cmpint (dest_mode & S_IFMT, ==, S_IFREG);
|
||||
|
||||
(void) g_file_delete (tmpfile, NULL, NULL);
|
||||
(void) g_file_delete (dest_tmpfile, NULL, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user