]> git.wh0rd.org - dump.git/commitdiff
Fixed an off-by-one calculation when dumping a one letter subdirectory.
authorStelian Pop <stelian@popies.net>
Mon, 24 Dec 2001 12:28:38 +0000 (12:28 +0000)
committerStelian Pop <stelian@popies.net>
Mon, 24 Dec 2001 12:28:38 +0000 (12:28 +0000)
CHANGES
dump/optr.c

diff --git a/CHANGES b/CHANGES
index 7ac39326d5b66c183277f559d6022f382512ae63..73ca93121484a7d576f791e2df78c7b4a5dff60a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.148 2001/11/30 10:14:36 stelian Exp $
+$Id: CHANGES,v 1.149 2001/12/24 12:28:38 stelian Exp $
 
 Changes between versions 0.4b25 and 0.4b26 (released ?????????????????)
 =======================================================================
 
 Changes between versions 0.4b25 and 0.4b26 (released ?????????????????)
 =======================================================================
@@ -8,6 +8,10 @@ Changes between versions 0.4b25 and 0.4b26 (released ?????????????????)
        automatic (cron based) full and incremental dumping of
        several filesystems on a separate filesystem.
 
        automatic (cron based) full and incremental dumping of
        several filesystems on a separate filesystem.
 
+2.     Fixed a off-by-one miscalculation which disabled dumping
+       a one letter subdirectory. Thanks to Chris Siebenmann 
+       <cks@utcc.utoronto.ca> for reporting the bug.
+
 Changes between versions 0.4b24 and 0.4b25 (released November 17, 2001)
 =======================================================================
 
 Changes between versions 0.4b24 and 0.4b25 (released November 17, 2001)
 =======================================================================
 
index 56e1f345bfe64aadfe15f997d21f92d1579101ca..6b86b9a8da2e0f9ce6cc8897b99140c8b31c9308 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: optr.c,v 1.27 2001/09/12 09:02:51 stelian Exp $";
+       "$Id: optr.c,v 1.28 2001/12/24 12:28:39 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -539,7 +539,7 @@ fstabsearchdir(const char *key, char *directory)
        for (pf = table; pf != NULL; pf = pf->pf_next) {
                fs = pf->pf_fstab;
                if (strlen(fs->fs_file) > size &&
        for (pf = table; pf != NULL; pf = pf->pf_next) {
                fs = pf->pf_fstab;
                if (strlen(fs->fs_file) > size &&
-                   strlen(key) > strlen(fs->fs_file) + 1 &&
+                   strlen(key) > strlen(fs->fs_file) &&
                    strncmp(fs->fs_file, key, strlen(fs->fs_file)) == 0 &&
                    (key[strlen(fs->fs_file)] == '/' ||
                     fs->fs_file[strlen(fs->fs_file) - 1] == '/')) {
                    strncmp(fs->fs_file, key, strlen(fs->fs_file)) == 0 &&
                    (key[strlen(fs->fs_file)] == '/' ||
                     fs->fs_file[strlen(fs->fs_file) - 1] == '/')) {