diff options
author | drh <> | 2021-12-24 19:44:11 +0000 |
---|---|---|
committer | drh <> | 2021-12-24 19:44:11 +0000 |
commit | c320e062a3eaa4be3c8e7b50c63c43054decb441 (patch) | |
tree | 75cac0bfa234694dc03f2c78208f7529ee8bbda3 /src | |
parent | ceeb04bf907ebe6970071aa94d5ac0546f82de53 (diff) | |
download | sqlite-c320e062a3eaa4be3c8e7b50c63c43054decb441.tar.gz sqlite-c320e062a3eaa4be3c8e7b50c63c43054decb441.zip |
Fix a minor problem in the CLI introduced by [d156123885abe6bf], apparently.
FossilOrigin-Name: 37e6e10f4364f556c7503c80408fc62895cdccdd0372fb2b63aaca02c3a1ee30
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index f743453b9..c6f623f5b 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -8975,11 +8975,11 @@ static int do_meta_command(char *zLine, ShellState *p){ /* If a filename is specified, try to open it first */ if( zFN || p->openMode==SHELL_OPEN_HEXDB ){ - if( newFlag && !p->bSafeMode ) shellDeleteFile(zNewFilename); + if( newFlag && zFN && !p->bSafeMode ) shellDeleteFile(zFN); if( p->bSafeMode && p->openMode!=SHELL_OPEN_HEXDB - && zNewFilename - && strcmp(zNewFilename,":memory:")!=0 + && zFN + && strcmp(zFN,":memory:")!=0 ){ failIfSafeMode(p, "cannot open disk-based database files in safe mode"); } |