Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid the folder, if creating db fails (Silently!) #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions examples/EDB_SDCARD/EDB_SDCARD.ino
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// operations will return EDB_OUT_OF_RANGE for all records outside the usable range.
#define RECORDS_TO_CREATE 10

char* db_name = "/db/edb_test.db";
char* db_name = "edb_test.db";
File dbFile;

// Arbitrary record definition for this table.
Expand Down Expand Up @@ -73,12 +73,6 @@ void setup()
return;
}

// Check dir for db files
if (!SD.exists("/db")) {
Serial.println("Dir for Db files does not exist, creating...");
SD.mkdir("/db");
}

if (SD.exists(db_name)) {

dbFile = SD.open(db_name, FILE_WRITE);
Expand Down