out_key->size = strlen(dirkey);
out_key->data = reallok(NULL, out_key->size);
+ memcpy(out_key->data, dirkey, strlen(dirkey));
+
out_data->size = strlen(username) + 1;
out_data->data = strdup(username);
+
return(1);
}
}
}
+ if (dst_dir == NULL) {
+ fprintf(stderr, "ctdlload: no destination directory was specified.\n");
+ exit(1);
+ }
+
if (confirmed == 1) {
fprintf(stderr, "ctdlload: You have specified the [-y] flag, so processing will continue.\n");
}
else {
- fprintf(stderr, "ctdlload: Please read [ https://www.citadel.org/dump-and-load.html ] to learn how to proceed.\n");
- exit(0);
+ fprintf(stderr, "ctdlload: usage: ctdlload -y -h[data_dir] <[dump_file]\n");
+ fprintf(stderr, " [data_dir] is your database directory, usually /usr/local/citadel/data\n");
+ fprintf(stderr, " Please read [ https://www.citadel.org/dump-and-load.html ] to learn how to proceed.\n");
+ exit(1);
}
// Remove any database that is already in the target directory (yes, delete it, be careful)