Commit dec23bd
authored
Support mkdir -p behavior when DB file does not exist (#180)
Currently, if you supply a DB path that includes directories which
do not exist, sqlite3 will not attempt to create them and the open
will crash.
This adds a quick attempt to `mkdir` on the db path to ensure all intermediary
directories exist before attempting to create the DB file for cases that
`SQLITE_OPEN_CREATE` flag is enabled and would expect the file to be
created when non-existant1 parent aa488d7 commit dec23bd
2 files changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
| 393 | + | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
| |||
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
552 | 560 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| |||
0 commit comments