From: Michael Tremer Date: Wed, 1 Nov 2023 17:48:03 +0000 (+0000) Subject: xfer: Remove restoring the mtime of downloads X-Git-Tag: 0.9.30~1326 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=99dc265ed704e9d8a50d5d1ee9581acf206c458c;p=pakfire.git xfer: Remove restoring the mtime of downloads The servers don't generally send this information. Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/xfer.c b/src/libpakfire/xfer.c index 9814d983a..e7f14ed42 100644 --- a/src/libpakfire/xfer.c +++ b/src/libpakfire/xfer.c @@ -22,7 +22,6 @@ #include #include #include -#include #include @@ -694,10 +693,6 @@ static const char* curl_http_version(long v) { } static int pakfire_xfer_save(struct pakfire_xfer* xfer) { - struct utimbuf times = { - .actime = 0, - .modtime = 0, - }; int r; // Flush any buffered data out to disk @@ -723,20 +718,10 @@ static int pakfire_xfer_save(struct pakfire_xfer* xfer) { // Move the temporary file to its destination r = linkat(fd, "", AT_FDCWD, xfer->path, AT_EMPTY_PATH); if (r) { - CTX_ERROR(xfer->ctx, "Could not link destination file %s: %m\n", - xfer->path); + CTX_ERROR(xfer->ctx, "Could not link destination file %s: %m\n", xfer->path); return r; } - // Filetime - curl_easy_getinfo(xfer->handle, CURLINFO_FILETIME_T, ×.modtime); - - if (times.modtime > 0) { - r = utime(xfer->path, ×); - if (r) - CTX_ERROR(xfer->ctx, "Could not set mtime of %s: %m\n", xfer->path); - } - return 0; }