summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2023-01-05 14:40:15 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2023-01-05 14:40:15 +0000
commita7d523cd08efef940175c56d5a548843fe86b3f3 (patch)
tree8a4204fa3fcba5687d51823bd6fee6e537af5249
parent35d3528623afe46bb3dda8ee1d7b6a79e74be91c (diff)
parenta56bc06f1659470e081fb88c511000ee02fb080b (diff)
downloadglib-a7d523cd08efef940175c56d5a548843fe86b3f3.tar.gz
Merge branch 'mtime-fix' into 'main'
glocalfileinfo: Don't reset mtime tv_sec when setting tv_usec See merge request GNOME/glib!3178
-rw-r--r--gio/glocalfileinfo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index ae7261bfe..420e9d4b2 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -2883,6 +2883,7 @@ set_mtime_atime (char *filename,
{
if (lazy_stat (filename, &statbuf, &got_stat) == 0)
{
+ times_n[1].tv_sec = statbuf.st_mtime;
#if defined (HAVE_STRUCT_STAT_ST_MTIMENSEC)
times_n[1].tv_nsec = statbuf.st_mtimensec;
#elif defined (HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)