diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2023-01-05 14:40:15 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2023-01-05 14:40:15 +0000 |
commit | a7d523cd08efef940175c56d5a548843fe86b3f3 (patch) | |
tree | 8a4204fa3fcba5687d51823bd6fee6e537af5249 | |
parent | 35d3528623afe46bb3dda8ee1d7b6a79e74be91c (diff) | |
parent | a56bc06f1659470e081fb88c511000ee02fb080b (diff) | |
download | glib-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.c | 1 |
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) |