diff -ru tar-1.26.orig/gnu/fdutimensat.c tar-1.26/gnu/fdutimensat.c --- tar-1.26.orig/gnu/fdutimensat.c 2011-04-28 10:03:22 +0200 +++ tar-1.26/gnu/fdutimensat.c 2011-05-12 08:41:47 +0200 @@ -48,8 +48,15 @@ int result = 1; if (0 <= fd) result = futimens (fd, ts); - if (file && (fd < 0 || (result == -1 && errno == ENOSYS))) + if (file && (fd < 0 || (result == -1 && errno == ENOSYS))) { + + /* need to sync here, as changes may not have been flushed to the + * disk, and the fd is lost from here on. */ + if (fd >= 0) + fsync (fd); + result = utimensat (dir, file, ts, atflag); + } if (result == 1) { errno = EBADF;