]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl: include the file name in --xattr/--remote-time error msgs
authorDaniel Stenberg <daniel@haxx.se>
Tue, 26 Jan 2021 16:02:39 +0000 (17:02 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 27 Jan 2021 07:45:11 +0000 (08:45 +0100)
src/tool_filetime.c
src/tool_operate.c

index 72798dbdb66e3f17b8463f827a76d0e4ef5729fd..e31fd591406e9e08709a1ac4c490bb541dbcb3c9 100644 (file)
@@ -140,7 +140,7 @@ void setfiletime(curl_off_t filetime, const char *filename,
     times[0].tv_usec = times[1].tv_usec = 0;
     if(utimes(filename, times)) {
       warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
-            " on outfile: %s\n", filetime, strerror(errno));
+            " on '%s': %s\n", filetime, filename, strerror(errno));
     }
 
 #elif defined(HAVE_UTIME)
@@ -149,7 +149,7 @@ void setfiletime(curl_off_t filetime, const char *filename,
     times.modtime = (time_t)filetime;
     if(utime(filename, &times)) {
       warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
-            " on outfile: %s\n", filetime, strerror(errno));
+            " on '%s': %s\n", filetime, filename, strerror(errno));
     }
 #endif
   }
index 457633a0699104c74e646b64d463bacfac7259f1..ae8a4f2ed17cda904b3febc5d90dba44857f926d 100644 (file)
@@ -374,8 +374,8 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
   if(!result && config->xattr && outs->fopened && outs->stream) {
     int rc = fwrite_xattr(curl, fileno(outs->stream));
     if(rc)
-      warnf(config->global, "Error setting extended attributes: %s\n",
-            strerror(errno));
+      warnf(config->global, "Error setting extended attributes on '%s': %s\n",
+            outs->filename, strerror(errno));
   }
 
   if(!result && !outs->stream && !outs->bytes) {