From 99dc265ed704e9d8a50d5d1ee9581acf206c458c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 1 Nov 2023 17:48:03 +0000 Subject: [PATCH] xfer: Remove restoring the mtime of downloads The servers don't generally send this information. Signed-off-by: Michael Tremer --- src/libpakfire/xfer.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) 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; } -- 2.47.2