Bug 4940 - wget-supports--P fails due to simple bug in wget -P
Summary: wget-supports--P fails due to simple bug in wget -P
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-17 19:23 UTC by Basil Nutmeg
Modified: 2012-06-17 18:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Basil Nutmeg 2012-03-17 19:23:08 UTC
The test wget-supports--P fails on trunk (with SKIP_INTERNET_TESTS unset).

It runs "busybox wget -q -P foo http://www.google.com/", and expects
to get an index.html in directory "foo". busybox wget instead writes
index.html into the current directory.

Looking at networking/wget.c, it appears to be a simple bug. For example,
deleting the "else" immediately after the comment
"/* -P DIR is considered only if there was no -O FILE */"
makes the code behave correctly.
Comment 1 Denys Vlasenko 2012-06-17 18:22:17 UTC
Fixed in git, thanks for analyzing it!