You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/12/16 08:57:45 UTC

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #925: Saving a file downloaded with wget - v3. combined commit

xiaoxiang781216 commented on a change in pull request #925:
URL: https://github.com/apache/incubator-nuttx-apps/pull/925#discussion_r770337888



##########
File path: examples/wget/wget_main.c
##########
@@ -152,13 +154,25 @@ int main(int argc, FAR char *argv[])
   ctx.buflen = 512;
   ctx.sink_callback = callback;
   ctx.sink_callback_arg = NULL;
-  if (argc > 1)
+
+  /* mode 0644 */
+
+  mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO;
+  char *filename = argv[2];
+
+  if (argc == 2)
     {
       ctx.url = argv[1];
+      fd = 1;
     }
   else
     {
-      ctx.url = CONFIG_EXAMPLES_WGET_URL;

Review comment:
       The new logic require the user always pass url from the command line. If so, should we remove  EXAMPLES_WGET_URL from Kconfig too?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org