]> sjero.net Git - wget/blobdiff - src/http.c
mass change: update copyright years.
[wget] / src / http.c
index 99f58b3f1a9d3ea69e312c495437eb34cbe2e3dd..142b9219442a8c5f2888ac8bea9edb76910786d0 100644 (file)
@@ -1,6 +1,7 @@
 /* HTTP support.
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+   Inc.
 
 This file is part of GNU Wget.
 
@@ -33,9 +34,7 @@ as that of the covered work.  */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <assert.h>
 #include <errno.h>
 #include <time.h>
@@ -2468,7 +2467,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
       mkalldirs (hs->local_file);
       if (opt.backups)
         rotate_backups (hs->local_file);
-      if (hs->restval || count > 0)
+      if (hs->restval)
         {
 #ifdef __VMS
           int open_id;
@@ -2479,7 +2478,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
           fp = fopen (hs->local_file, "ab");
 #endif /* def __VMS [else] */
         }
-      else if (ALLOW_CLOBBER)
+      else if (ALLOW_CLOBBER || count > 0)
         {
          if (opt.unlink && file_exists_p (hs->local_file))
            {