diff options
author | Kevin McCarthy <kevin@8t8.us> | 2020-07-08 12:59:36 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2020-07-08 12:59:36 -0700 |
commit | b108d1b700f6eff6f83a7735eabd1d632b1ad4fb (patch) | |
tree | 8d96e6af496bf8b21d95219a8a5dd6c5ba608c2f | |
parent | b48f8e1e1510ff1560921a912aa124043a936f05 (diff) | |
parent | 222bd804148dc2bdb5e79df91d61fc3a28926f4f (diff) |
Merge branch 'stable'
-rw-r--r-- | buffy.c | 5 | ||||
-rw-r--r-- | mbox.c | 4 | ||||
-rw-r--r-- | mx.c | 4 |
3 files changed, 7 insertions, 6 deletions
@@ -42,6 +42,7 @@ #endif #include <string.h> +#include <fcntl.h> #include <sys/stat.h> #include <dirent.h> #include <utime.h> @@ -172,7 +173,7 @@ void mutt_buffy_cleanup (const char *buf, struct stat *st) ts[0].tv_nsec = UTIME_OMIT; ts[1].tv_sec = 0; ts[1].tv_nsec = UTIME_NOW; - utimensat (0, buf, ts, 0); + utimensat (AT_FDCWD, buf, ts, 0); #else ut.actime = st->st_atime; ut.modtime = time (NULL); @@ -186,7 +187,7 @@ void mutt_buffy_cleanup (const char *buf, struct stat *st) ts[0].tv_nsec = UTIME_NOW; ts[1].tv_sec = 0; ts[1].tv_nsec = UTIME_NOW; - utimensat (0, buf, ts, 0); + utimensat (AT_FDCWD, buf, ts, 0); #else utime (buf, NULL); #endif @@ -115,7 +115,7 @@ int mmdf_parse_mailbox (CONTEXT *ctx) ts[0].tv_nsec = UTIME_NOW; ts[1].tv_sec = 0; ts[1].tv_nsec = UTIME_OMIT; - utimensat (0, ctx->path, ts, 0); + utimensat (AT_FDCWD, ctx->path, ts, 0); #else newtime.actime = time (NULL); newtime.modtime = sb.st_mtime; @@ -277,7 +277,7 @@ int mbox_parse_mailbox (CONTEXT *ctx) ts[0].tv_nsec = UTIME_NOW; ts[1].tv_sec = 0; ts[1].tv_nsec = UTIME_OMIT; - utimensat (0, ctx->path, ts, 0); + utimensat (AT_FDCWD, ctx->path, ts, 0); #else newtime.actime = time (NULL); newtime.modtime = sb.st_mtime; @@ -468,7 +468,7 @@ int mx_get_magic (const char *path) #ifdef HAVE_UTIMENSAT mutt_get_stat_timespec (&ts[0], &st, MUTT_STAT_ATIME); mutt_get_stat_timespec (&ts[1], &st, MUTT_STAT_MTIME); - utimensat (0, path, ts, 0); + utimensat (AT_FDCWD, path, ts, 0); #else times.actime = st.st_atime; times.modtime = st.st_mtime; @@ -699,7 +699,7 @@ void mx_fastclose_mailbox (CONTEXT *ctx) #ifdef HAVE_UTIMENSAT ts[0] = ctx->atime; ts[1] = ctx->mtime; - utimensat (0, ctx->path, ts, 0); + utimensat (AT_FDCWD, ctx->path, ts, 0); #else ut.actime = ctx->atime.tv_sec; ut.modtime = ctx->mtime.tv_sec; |