aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory_save.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/directory_save.c')
-rw-r--r--src/directory_save.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/directory_save.c b/src/directory_save.c
index 36b0c1a01..00cf5f8e0 100644
--- a/src/directory_save.c
+++ b/src/directory_save.c
@@ -84,6 +84,10 @@ directory_load(FILE *fp, struct directory *directory)
if (prefixcmp(buffer, DIRECTORY_BEGIN))
FATAL("Error reading db at line: %s\n", buffer);
name = &(buffer[strlen(DIRECTORY_BEGIN)]);
+ if (prefixcmp(name, directory->path) != 0)
+ FATAL("Wrong path in database: '%s' in '%s'\n",
+ name, directory->path);
+
if ((subdir = db_get_directory(name))) {
assert(subdir->parent == directory);
} else {