X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Furl.c;fp=src%2Furl.c;h=bf9d6971de49e52f75762aa7a2c4d174a7eb41c1;hp=5e2b9a3bde9f1a0d79a74bfc093317ceb3e21783;hb=c52bbad9e4bad1393a9d6ba37e600d388f5ab419;hpb=44ba49b31f4ea515f8a6ef2642a34c0fd2024b90 diff --git a/src/url.c b/src/url.c index 5e2b9a3b..bf9d6971 100644 --- a/src/url.c +++ b/src/url.c @@ -1669,11 +1669,12 @@ url_file_name (const struct url *u, char *replaced_filename) 2) Retrieval with regetting. 3) Timestamping is used. 4) Hierarchy is built. + 5) Backups are specified. The exception is the case when file does exist and is a directory (see `mkalldirs' for explanation). */ - if ((opt.noclobber || opt.always_rest || opt.timestamping || opt.dirstruct) + if (ALLOW_CLOBBER && !(file_exists_p (fname) && !file_non_directory_p (fname))) { unique = fname;