mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-04-05 20:31:00 +08:00
Handle 'file not found' case
This commit is contained in:
parent
6bec184d98
commit
e6c4050c74
@ -1,6 +1,7 @@
|
||||
Thu Jun 16 21:19:37 CDT 2005 Jeff Smith <whydoubt@yahoo.com>
|
||||
* src/libmdb/data.c: Fix segmentation fault
|
||||
* src/libmdb/write.c: Fix bug in handling certain 'jump tables'
|
||||
* src/util/mdb-schema.c: Handle 'file not found' case
|
||||
|
||||
Mon May 2 07:28:58 CDT 2005 Jeff Smith <whydoubt@yahoo.com>
|
||||
* include/mdbtools.h:
|
||||
|
@ -62,18 +62,23 @@ main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
mdb_init();
|
||||
mdb_init();
|
||||
|
||||
/* open the database */
|
||||
|
||||
mdb = mdb_open (argv[optind], MDB_NOFLAGS);
|
||||
if (argc - optind >= 2) {
|
||||
if (!mdb_set_default_backend(mdb, argv[optind + 1])) {
|
||||
fprintf(stderr,"Invalid backend type\n");
|
||||
/* open the database */
|
||||
mdb = mdb_open (argv[optind], MDB_NOFLAGS);
|
||||
if (!mdb) {
|
||||
fprintf(stderr, "Could not open file\n");
|
||||
mdb_exit();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (argc - optind >= 2) {
|
||||
if (!mdb_set_default_backend(mdb, argv[optind + 1])) {
|
||||
fprintf(stderr, "Invalid backend type\n");
|
||||
mdb_exit();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* read the catalog */
|
||||
if (!mdb_read_catalog (mdb, MDB_TABLE)) {
|
||||
|
Loading…
Reference in New Issue
Block a user