1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix a (harmless) off-by-one error in the unix VFS logic that fsync()s a

directory after deleting a file.

FossilOrigin-Name: 3d02711a709a7e708edb0ea8ca5d17b39dd307f6
This commit is contained in:
drh
2015-12-02 02:08:30 +00:00
parent 50358adfaa
commit adfa22e118
3 changed files with 8 additions and 8 deletions

View File

@@ -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 ){