summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2023-06-28 17:49:45 +0100
committerPhilip Withnall <pwithnall@endlessos.org>2023-07-04 17:19:49 +0100
commit4a9c00fa942b1b760cd2bfa3874d4b80e7c1a62a (patch)
treea3e6e20d6d43036f411ea6a1aa1a69aa86f22faf
parent0feee5b670c66ce6e60851820ecda84722c88f60 (diff)
downloadglib-4a9c00fa942b1b760cd2bfa3874d4b80e7c1a62a.tar.gz
glocalfileinfo: Delete some redundant code
`_g_stat_has_field (statbuf, G_LOCAL_FILE_STAT_FIELD_ATIME)` will always return `TRUE` on Windows (since it uses a basic `struct stat`), so the platform-inspecific code is equivalent to the Windows-specific code. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rw-r--r--gio/glocalfileinfo.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index dc027e4dc..7c2524e8d 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1026,19 +1026,12 @@ set_info_from_stat (GFileInfo *info,
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_MODIFIED_USEC, _g_stat_mtim_nsec (statbuf) / 1000);
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_MODIFIED_NSEC, _g_stat_mtim_nsec (statbuf));
-#if defined (G_OS_WIN32)
- _g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS, statbuf->st_atim.tv_sec);
- _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC, statbuf->st_atim.tv_nsec / 1000);
- _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_NSEC, statbuf->st_atim.tv_nsec);
-#else
-
if (_g_stat_has_field (statbuf, G_LOCAL_FILE_STAT_FIELD_ATIME))
{
_g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS, _g_stat_atime (statbuf));
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_USEC, _g_stat_atim_nsec (statbuf) / 1000);
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_ACCESS_NSEC, _g_stat_atim_nsec (statbuf));
}
-#endif
#ifndef G_OS_WIN32
/* Microsoft uses st_ctime for file creation time,