mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-10 08:22:27 +01:00
If downloading to a temporary file, set the timestamp on the temp file, not
on the file we're replacing. PR: bin/34992 Submitted by: Shunichiro Ariura <syun1rou@blackshell.org> MFC after: 1 week
This commit is contained in:
parent
911eb59369
commit
8e7cf3debf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90729
@ -549,8 +549,8 @@ fetch(char *URL, const char *path)
|
||||
tv[0].tv_sec = (long)(us.atime ? us.atime : us.mtime);
|
||||
tv[1].tv_sec = (long)us.mtime;
|
||||
tv[0].tv_usec = tv[1].tv_usec = 0;
|
||||
if (utimes(path, tv))
|
||||
warn("%s: utimes()", path);
|
||||
if (utimes(tmppath ? tmppath : path, tv))
|
||||
warn("%s: utimes()", tmppath ? tmppath : path);
|
||||
}
|
||||
|
||||
/* timed out or interrupted? */
|
||||
|
Loading…
Reference in New Issue
Block a user