]> sjero.net Git - wget/blobdiff - src/url.h
Make --backups work as documented
[wget] / src / url.h
index b7f4366d5c48b615a1270c834f35134c1d5b7cce..cd3782b1e0b833cb5a21e8d87b8d6d864aa9827c 100644 (file)
--- a/src/url.h
+++ b/src/url.h
@@ -47,6 +47,12 @@ as that of the covered work.  */
  * file descriptor. */
 #define CHOMP_BUFFER 19
 
+/* The flags that allow clobbering the file (opening with "wb").
+   Defined here to avoid repetition later.  #### This will require
+   rework.  */
+#define ALLOW_CLOBBER (opt.noclobber || opt.always_rest || opt.timestamping \
+                  || opt.dirstruct || opt.output_document || opt.backups > 0)
+
 /* Specifies how, or whether, user auth information should be included
  * in URLs regenerated from URL parse structures. */
 enum url_auth_mode {