From e8b61e46abd8471f0ea45a827a53b0eb5b3220cc Mon Sep 17 00:00:00 2001
From: hniksic <devnull@localhost>
Date: Sat, 25 Feb 2006 15:28:49 -0800
Subject: [PATCH] [svn] Only use FILE.N.html if FILE.html exists.

---
 src/ChangeLog | 4 ++++
 src/http.c    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index dfc743d1..6a980968 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-25  Hrvoje Niksic  <hniksic@xemacs.org>
+
+	* http.c (gethttp): Only use FILE.N.html if FILE.html exists.
+
 2006-02-09  Hrvoje Niksic  <hniksic@xemacs.org>
 
 	* mswindows.c (run_with_timeout): Made thread_hnd non-static.
diff --git a/src/http.c b/src/http.c
index 2225b43c..c5827275 100644
--- a/src/http.c
+++ b/src/http.c
@@ -1979,7 +1979,7 @@ File `%s' already there; not retrieving.\n\n"), hs->local_file);
           strcpy(hs->local_file + local_filename_len, ".html");
           /* If clobbering is not allowed and the file, as named,
              exists, tack on ".NUMBER.html" instead. */
-          if (!ALLOW_CLOBBER)
+          if (!ALLOW_CLOBBER && file_exists_p (hs->local_file))
             {
               int ext_num = 1;
               do