Merge branch 'wip/issue2205' into 'master'

glocalfile: Never require G_LOCAL_FILE_STAT_FIELD_ATIME

Closes #2205 and #2189

See merge request GNOME/glib!1648
This commit is contained in:
Philip Withnall 2020-09-22 15:51:03 +00:00
commit 6248039403
2 changed files with 4 additions and 3 deletions

View File

@ -2703,7 +2703,8 @@ g_local_file_measure_size_of_file (gint parent_fd,
#if defined (AT_FDCWD)
if (g_local_file_fstatat (parent_fd, name->data, AT_SYMLINK_NOFOLLOW,
G_LOCAL_FILE_STAT_FIELD_BASIC_STATS, G_LOCAL_FILE_STAT_FIELD_ALL,
G_LOCAL_FILE_STAT_FIELD_BASIC_STATS,
G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_ATIME),
&buf) != 0)
{
int errsv = errno;

View File

@ -1858,7 +1858,7 @@ _g_local_file_info_get (const char *basename,
{
res = g_local_file_stat (path,
G_LOCAL_FILE_STAT_FIELD_BASIC_STATS | G_LOCAL_FILE_STAT_FIELD_BTIME,
G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_BTIME),
G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_BTIME) & (~G_LOCAL_FILE_STAT_FIELD_ATIME),
&statbuf2);
/* Report broken links as symlinks */
@ -2081,7 +2081,7 @@ _g_local_file_info_get_from_fd (int fd,
if (g_local_file_fstat (fd,
G_LOCAL_FILE_STAT_FIELD_BASIC_STATS | G_LOCAL_FILE_STAT_FIELD_BTIME,
G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_BTIME),
G_LOCAL_FILE_STAT_FIELD_ALL & (~G_LOCAL_FILE_STAT_FIELD_BTIME) & (~G_LOCAL_FILE_STAT_FIELD_ATIME),
&stat_buf) == -1)
{
int errsv = errno;