this is a forward of debian bug #735581, which lives over there: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735581
restore should restore symlink timestamps where possible, i.e. at least on linux. the attached patch teaches restore how to do that on linux.
afaict, that patch is 90% whitespace noise and there's only one functional change. please filter your patches before uploading them for review.
however, i don't think this is correct for a few reasons:
__linux__
, bututimensat
is in POSIXutimes
interface. it's also in POSIX, but has been for longer, which makes it more portable.you're mostly correct: i had the micro-to-nano conversion reversed.
the problem with utimes() is that it doesn't let you modify symlinks, it always dereferences. utimensat() lets you choose the target of the link or the link itself. regarding posix i've reworked the patch to put that code under #ifdef HAVE_UTIMENSAT, and put it in the right spot (for some stupid reason i had added it to IFREG, not IFLNK). configure now checks for utimensat.
thanks, merge in 575766acd134cab74dc68bdd7d6808a338fc9a37