]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_operate: stop setting the file comment on Amiga
authorDaniel Stenberg <daniel@haxx.se>
Mon, 15 Jan 2024 15:28:04 +0000 (16:28 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 15 Jan 2024 17:21:16 +0000 (18:21 +0100)
- the URL is capped at 80 cols, which ruins it if longer
- it does not strip off URL credentials
- it is done unconditonally, not on --xattr
- we don't have Amiga in the CI which makes fixing it blindly fragile

Someone who builds and tests on Amiga can add it back correctly in a
future if there is a desire.

Reported-by: Harry Sintonen
Closes #12709

src/tool_operate.c

index 3fe5b511654b167526ceae56069321c753fbdbf5..1ffd6730ec824dcbb22007cf91ae68fb7adbbd8d 100644 (file)
@@ -343,22 +343,6 @@ static CURLcode pre_transfer(struct GlobalConfig *global,
   return result;
 }
 
-#ifdef __AMIGA__
-static void AmigaSetComment(struct per_transfer *per,
-                            CURLcode result)
-{
-  struct OutStruct *outs = &per->outs;
-  if(!result && outs->s_isreg && outs->filename) {
-    /* Set the url (up to 80 chars) as comment for the file */
-    if(strlen(per->this_url) > 78)
-      per->this_url[79] = '\0';
-    SetComment(outs->filename, per->this_url);
-  }
-}
-#else
-#define AmigaSetComment(x,y) Curl_nop_stmt
-#endif
-
 /* When doing serial transfers, we use a single fixed error area */
 static char global_errorbuffer[CURL_ERROR_SIZE];
 
@@ -658,8 +642,6 @@ noretry:
     }
   }
 
-  AmigaSetComment(per, result);
-
   /* File time can only be set _after_ the file has been closed */
   if(!result && config->remote_time && outs->s_isreg && outs->filename) {
     /* Ask libcurl if we got a remote file time */