mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-16 01:05:15 +08:00
[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
This commit is contained in:
1 parent
9e6dec3b14
commit
f29b9ae21c
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user