aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-07-14 01:45:22 +0000
committerdrh <drh@noemail.net>2010-07-14 01:45:22 +0000
commit5d4feffe7d96893d6eb339818101615748618673 (patch)
tree45ac13200ccef6a512aaa1abc0be2f22125e29ac /src/os_unix.c
parent54e05362755af3659fda80c8245fcee7e56f4a56 (diff)
downloadsqlite-5d4feffe7d96893d6eb339818101615748618673.tar.gz
sqlite-5d4feffe7d96893d6eb339818101615748618673.zip
Fix the unix driver to return an I/O error if unlink fails for any reason
other than the file not existing in the first place. FossilOrigin-Name: 90d73c66bfa880cdeb688b3016c8b1c58bfcf35f
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;