* libmisc/copydir.c: Call utimes() after closing the file.
This commit is contained in:
@@ -566,16 +566,18 @@ static int copy_file (const char *src, const char *dst,
|
||||
if (futimes (ofd, mt) != 0) {
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
if (utimes(dst, mt) != 0) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (close (ofd) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifndef HAVE_FUTIMES
|
||||
if (utimes(dst, mt) != 0) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user