diff options
author | drh <drh@noemail.net> | 2015-12-02 02:08:30 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-12-02 02:08:30 +0000 |
commit | adfa22e118e7a0db0a89ff899ddcd48d517e9c31 (patch) | |
tree | c528a2d253e182265799b07298820e260ac49f79 /src/os_unix.c | |
parent | 50358adfaaef3ab020bbf0d51560141d9a6713db (diff) | |
download | sqlite-adfa22e118e7a0db0a89ff899ddcd48d517e9c31.tar.gz sqlite-adfa22e118e7a0db0a89ff899ddcd48d517e9c31.zip |
Fix a (harmless) off-by-one error in the unix VFS logic that fsync()s a
directory after deleting a file.
FossilOrigin-Name: 3d02711a709a7e708edb0ea8ca5d17b39dd307f6
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 38c8d7b61..8eff392a6 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3461,7 +3461,7 @@ static int openDirectory(const char *zFilename, int *pFd){ sqlite3_snprintf(MAX_PATHNAME, zDirname, "%s", zFilename); for(ii=(int)strlen(zDirname); ii>1 && zDirname[ii]!='/'; ii--); - if( ii>0 ){ + if( ii>1 ){ zDirname[ii] = '\0'; fd = robust_open(zDirname, O_RDONLY|O_BINARY, 0); if( fd>=0 ){ |