summaryrefslogtreecommitdiff
path: root/wget.c
diff options
context:
space:
mode:
authorMatt Kraai2001-07-19 17:29:38 +0000
committerMatt Kraai2001-07-19 17:29:38 +0000
commitc8eae6684b725f9cb62a05fedbd32d8c349634e1 (patch)
tree09526c68f18a10ea5d812821abeaea1134067f0c /wget.c
parentc1cda4a6091902bdb81cb8938838f4b26ddc52cf (diff)
downloadbusybox-c8eae6684b725f9cb62a05fedbd32d8c349634e1.zip
busybox-c8eae6684b725f9cb62a05fedbd32d8c349634e1.tar.gz
The directory name should only be prepended if one was specified.
Diffstat (limited to 'wget.c')
-rw-r--r--wget.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wget.c b/wget.c
index 61945b7..5d94f6e 100644
--- a/wget.c
+++ b/wget.c
@@ -272,7 +272,8 @@ int wget_main(int argc, char **argv)
output = stdout;
quiet_flag = TRUE;
} else {
- fname_out = concat_path_file(dir_prefix, fname_out);
+ if (dir_prefix != NULL)
+ fname_out = concat_path_file(dir_prefix, fname_out);
output = xfopen(fname_out, (do_continue ? "a" : "w"));
}
@@ -816,7 +817,7 @@ progressmeter(int flag)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: wget.c,v 1.42 2001/06/21 19:45:06 andersen Exp $
+ * $Id: wget.c,v 1.43 2001/07/19 17:29:38 kraai Exp $
*/