Bug 4940

Summary: wget-supports--P fails due to simple bug in wget -P
Product: Busybox Reporter: Basil Nutmeg <basil+busybox>
Component: NetworkingAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Host: Target:
Build:

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!