* libmisc/copydir.c: Call utimes() after closing the file.
This commit is contained in:
parent
828e9d095e
commit
f91b828708
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
* libmisc/copydir.c, configure.in: Check for the presence of
|
* libmisc/copydir.c, configure.in: Check for the presence of
|
||||||
st_mtim and st_mtimensec, as for st_atim and st_atimensec.
|
st_mtim and st_mtimensec, as for st_atim and st_atimensec.
|
||||||
|
* libmisc/copydir.c: Call utimes() after closing the file.
|
||||||
|
|
||||||
2008-09-07 Nicolas François <nicolas.francois@centraliens.net>
|
2008-09-07 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
@ -566,16 +566,18 @@ static int copy_file (const char *src, const char *dst,
|
|||||||
if (futimes (ofd, mt) != 0) {
|
if (futimes (ofd, mt) != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (utimes(dst, mt) != 0) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (close (ofd) != 0) {
|
if (close (ofd) != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_FUTIMES
|
||||||
|
if (utimes(dst, mt) != 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user