diff options
| author | bernard <[email protected]> | 2026-10-18 19:33:52 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-10-27 19:20:33 +0800 |
| commit | f29b9ae21ccd70e749324b3f13cba6d843fc642d (patch) | |
| tree | 1a69d255e3bbfd02584ff68355f0bd2ebe3aa041 /components | |
| parent | 9e6dec3b14f5bf5514b0da829736c2485c38b0a7 (diff) | |
[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
Diffstat (limited to 'components')
| -rw-r--r-- | components/dfs/dfs_v2/src/dfs_posix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/dfs/dfs_v2/src/dfs_posix.c b/components/dfs/dfs_v2/src/dfs_posix.c index ace65b721a..5044bec748 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; } |
