diff --git a/include/database.hpp b/include/database.hpp index 70554b5a..1bc546b8 100644 --- a/include/database.hpp +++ b/include/database.hpp @@ -45,6 +45,9 @@ void Database :: load() { unsigned int db_size; + if (file.exists() == false) + return; + try { file.open(OPEN_READ); } catch (int error) { diff --git a/tests/database/database.good b/tests/database/database.good index 59f384a6..dd3ba5eb 100644 --- a/tests/database/database.good +++ b/tests/database/database.good @@ -300026,7 +300026,6 @@ db[99999] = 100000 ERROR: A file with hint = FILE_TYPE_INVALID cannot be opened Test 3 -ERROR: A file with hint = FILE_TYPE_INVALID cannot be opened Test 4 Database size: 5