diff options
author | drh <drh@noemail.net> | 2018-01-05 18:51:25 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-01-05 18:51:25 +0000 |
commit | 7ee8836e08cca0ecd8af0749e5072e5bc36352cc (patch) | |
tree | d3ccc0bdea36d608176eb8421e7cddc952ddd69d /ext/misc/fileio.c | |
parent | af23899318236a918af9cbfed85dcc57769077ec (diff) | |
download | sqlite-7ee8836e08cca0ecd8af0749e5072e5bc36352cc.tar.gz sqlite-7ee8836e08cca0ecd8af0749e5072e5bc36352cc.zip |
Fix a bug introduced by efforts to reduce compiler warnings in
check-in [364ac333b030f0]
FossilOrigin-Name: 1d6cee9ad448b10e69f351ef9dbec09110c5b189cba8734e637f41abe8f35bf8
Diffstat (limited to 'ext/misc/fileio.c')
-rw-r--r-- | ext/misc/fileio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/misc/fileio.c b/ext/misc/fileio.c index 796bee399..030b417e4 100644 --- a/ext/misc/fileio.c +++ b/ext/misc/fileio.c @@ -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; |