summaryrefslogtreecommitdiff
path: root/mail/cyrus-imapd21/patches/patch-ak
blob: 38b68019077ffd3d040d0290f5cf5ede84165243 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ak,v 1.3 2003/08/16 09:23:59 recht Exp $

--- imap/ctl_cyrusdb.c.orig	2003-05-02 17:23:05.000000000 +0200
+++ imap/ctl_cyrusdb.c	2003-07-26 14:21:45.000000000 +0200
@@ -231,9 +231,9 @@
 
     /* create the names of the backup directories */
     strcpy(backup1, dirname);
-    strcat(backup1, ".backup1/");
+    strcat(backup1, ".backup1");
     strcpy(backup2, dirname);
-    strcat(backup2, ".backup2/");
+    strcat(backup2, ".backup2");
 
     syslog(LOG_NOTICE, "%s", msg);
 
@@ -289,6 +289,7 @@
 		struct dirent *dirent;
 
 		tail = backup2 + strlen(backup2);
+		*tail++ = '/';
 
 		/* remove db.backup2 */
 		dirp = opendir(backup2);
@@ -302,7 +303,7 @@
 
 		    closedir(dirp);
 		}
-		*tail = '\0';
+		tail[-1] = '\0';
 		r2 = rmdir(backup2);
 
 		/* move db.backup1 to db.backup2 */