aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index ba614c563..0c6519ac3 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4553,7 +4553,9 @@ static int unixDelete(
int rc = SQLITE_OK;
UNUSED_PARAMETER(NotUsed);
SimulateIOError(return SQLITE_IOERR_DELETE);
- unlink(zPath);
+ if( unlink(zPath)==(-1) && errno!=ENOENT ){
+ return SQLITE_IOERR_DELETE;
+ }
#ifndef SQLITE_DISABLE_DIRSYNC
if( dirSync ){
int fd;