/ Check-in [1d6cee9a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug introduced by efforts to reduce compiler warnings in check-in [364ac333b030f0]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sqlar-shell-support
Files: files | file ages | folders
SHA3-256:1d6cee9ad448b10e69f351ef9dbec09110c5b189cba8734e637f41abe8f35bf8
User & Date: drh 2018-01-05 18:51:25
Context
2018-01-05
19:01
Add the ".ar" command to the command-line shell. check-in: 148b8aee user: drh tags: trunk
18:51
Fix a bug introduced by efforts to reduce compiler warnings in check-in [364ac333b030f0] Closed-Leaf check-in: 1d6cee9a user: drh tags: sqlar-shell-support
17:40
In the Makefile for MSVC, the default target should not include binaries that link against the Tcl library. check-in: 5c6d0a1d user: mistachkin tags: sqlar-shell-support
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/fileio.c.

   178    178       rc = SQLITE_NOMEM;
   179    179     }else{
   180    180       int nCopy = (int)strlen(zCopy);
   181    181       int i = 1;
   182    182   
   183    183       while( rc==SQLITE_OK ){
   184    184         struct stat sStat;
          185  +      int rc2;
   185    186   
   186    187         for(; zCopy[i]!='/' && i<nCopy; i++);
   187    188         if( i==nCopy ) break;
   188    189         zCopy[i] = '\0';
   189    190   
   190         -      rc = stat(zCopy, &sStat);
   191         -      if( rc!=0 ){
          191  +      rc2 = stat(zCopy, &sStat);
          192  +      if( rc2!=0 ){
   192    193           if( mkdir(zCopy, mode & 0777) ) rc = SQLITE_ERROR;
   193    194         }else{
   194    195           if( !S_ISDIR(sStat.st_mode) ) rc = SQLITE_ERROR;
   195    196         }
   196    197         zCopy[i] = '/';
   197    198         i++;
   198    199       }