The directory name should only be prepended if one was specified.
authorMatt Kraai <kraai@debian.org>
Thu, 19 Jul 2001 17:29:38 +0000 (17:29 -0000)
committerMatt Kraai <kraai@debian.org>
Thu, 19 Jul 2001 17:29:38 +0000 (17:29 -0000)
networking/wget.c
wget.c

index 61945b7d1ec641af658a3805da416c3757bbd52c..5d94f6e1ac891db1c17b093cb9a8fdabac37051e 100644 (file)
@@ -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 $
  */
 
 
diff --git a/wget.c b/wget.c
index 61945b7d1ec641af658a3805da416c3757bbd52c..5d94f6e1ac891db1c17b093cb9a8fdabac37051e 100644 (file)
--- 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 $
  */