Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Export the deduceDatabaseType() function the shell.c source file. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d0f35739af3b226c8eef396764072936 |
User & Date: | drh 2018-05-14 00:41:12.032 |
Context
2018-05-14
| ||
12:23 | Fix typo in the shell.c source file. (check-in: 389dc0a901 user: mistachkin tags: trunk) | |
00:41 | Export the deduceDatabaseType() function the shell.c source file. (check-in: d0f35739af user: drh tags: trunk) | |
00:23 | Add the --append option to the ".backup" command in the CLI. (check-in: 0dfdbdee52 user: drh tags: trunk) | |
Changes
Changes to src/shell.c.in.
︙ | ︙ | |||
3537 3538 3539 3540 3541 3542 3543 | ** one of the SHELL_OPEN_* constants. ** ** If the file does not exist or is empty but its name looks like a ZIP ** archive and the dfltZip flag is true, then assume it is a ZIP archive. ** Otherwise, assume an ordinary database regardless of the filename if ** the type cannot be determined from content. */ | | | 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 | ** one of the SHELL_OPEN_* constants. ** ** If the file does not exist or is empty but its name looks like a ZIP ** archive and the dfltZip flag is true, then assume it is a ZIP archive. ** Otherwise, assume an ordinary database regardless of the filename if ** the type cannot be determined from content. */ int deduceDatabaseType(const char *zName, int dfltZip){ FILE *f = fopen(zName, "rb"); size_t n; int rc = SHELL_OPEN_UNSPEC; char zBuf[100]; if( f==0 ){ if( dfltZip && sqlite3_strlike("%.zip",zName,0)==0 ) return SHELL_OPEN_ZIPFILE; return SHELL_OPEN_NORMAL; |
︙ | ︙ |