From 07a15b4af39358b0711a8f69ea04a2052238db3c Mon Sep 17 00:00:00 2001 From: bernard Date: Sun, 18 Oct 2026 19:33:52 +0800 Subject: [PATCH] [dfs] fix UTIME_OMIT handling in utimensat - UTIME_OMIT means the corresponding timestamp must not be changed - the inverted condition overwrote mtime and ignored a valid timestamp - correct the comparison so UTIME_OMIT leaves the attribute untouched --- components/dfs/dfs_v2/src/dfs_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dfs/dfs_v2/src/dfs_posix.c b/components/dfs/dfs_v2/src/dfs_posix.c index ace65b721a05..5044bec74840 100644 --- a/components/dfs/dfs_v2/src/dfs_posix.c +++ b/components/dfs/dfs_v2/src/dfs_posix.c @@ -219,7 +219,7 @@ int utimensat(int __fd, const char *__path, const struct timespec __times[2], in { attr.ia_mtime.tv_sec = current_time; } - else if (UTIME_OMIT == __times[1].tv_nsec) + else if (UTIME_OMIT != __times[1].tv_nsec) { attr.ia_mtime.tv_sec = __times[1].tv_sec; }