mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user