1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix a bug introduced by efforts to reduce compiler warnings in

check-in [364ac333b030f0]

FossilOrigin-Name: 1d6cee9ad448b10e69f351ef9dbec09110c5b189cba8734e637f41abe8f35bf8
This commit is contained in:
drh
2018-01-05 18:51:25 +00:00
parent af23899318
commit 7ee8836e08
3 changed files with 11 additions and 10 deletions

View File

@ -182,13 +182,14 @@ static int makeDirectory(
while( rc==SQLITE_OK ){
struct stat sStat;
int rc2;
for(; zCopy[i]!='/' && i<nCopy; i++);
if( i==nCopy ) break;
zCopy[i] = '\0';
rc = stat(zCopy, &sStat);
if( rc!=0 ){
rc2 = stat(zCopy, &sStat);
if( rc2!=0 ){
if( mkdir(zCopy, mode & 0777) ) rc = SQLITE_ERROR;
}else{
if( !S_ISDIR(sStat.st_mode) ) rc = SQLITE_ERROR;