Re: hdup 1.6.32
Miek Gieben <[email protected]> Fri, 25 Jun 2004 11:13:27 +0200
| Newsgroups | gmane.comp.sysutils.backup.hdup.general |
|---|---|
| Message-ID | <[email protected]> |
[On 23 Jun, @19:49, hdup-user wrote in "[hdup-user] hdup 1.6.32 ..."] > Well here it is: hdup 1.6.32 > > Release focus: feature enhancements I noticed one weird thing: 'archive dir' must be specified with a closing '/', like this: archive dir = /vol/backup/ If you don't the backup path will be /vol/backupelektron in my case. So either add the slash, or use the attached patch, which adds the / is there is none. I personnally find this quite annoying so I problably will release a new version of hdup quite soon. grtz Miek
patch
(text/plain, 1.9 KB)
diff -u -r1.43 -r1.44
--- hdupconf.c 23 Jun 2004 13:20:07 -0000 1.43
+++ hdupconf.c 24 Jun 2004 08:55:45 -0000 1.44
@@ -1,7 +1,7 @@
/* hdupconf.c
* parses a hdup config file
*
- * $Id: hdupconf.c,v 1.43 2004/06/23 13:20:07 miekg Exp $
+ * $Id: hdupconf.c,v 1.44 2004/06/24 08:55:45 miekg Exp $
*
* Copyright:
*
@@ -73,6 +73,7 @@
char *h = (char *)NULL;
int i, len;
int linecnt;
+ int slash;
len = 0; i = -1; linecnt = 0;
@@ -198,8 +199,16 @@
setlist(right, host[i]->include);
break;
case KEY_ARCHIVE:
- host[i]->archive = (char*)xmalloc(strlen(right) + 3);
+ host[i]->archive = (char*)xmalloc(strlen(right) + 4);
setvar(right, host[i]->archive);
+ slash = strlen(host[i]->archive);
+
+ if ( (host[i]->archive)[slash-1] != '/') {
+ /* add a closing / if not already there */
+ VVERBOSE("%s","Adding closing \'/\' to archive dir");
+ (host[i]->archive)[slash] = '/';
+ (host[i]->archive)[slash+1] = '\0';
+ }
break;
case KEY_PROTO_OPT:
host[i]->proto_opt = (char*)xmalloc(strlen(right) + 3);