SQLite

Check-in [1d6cee9ad4]
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
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.650
Context
2018-01-05
19:01
Add the ".ar" command to the command-line shell. (check-in: 148b8aee78 user: drh tags: trunk)
18:51
Fix a bug introduced by efforts to reduce compiler warnings in check-in [364ac333b030f0] (Closed-Leaf check-in: 1d6cee9ad4 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: 5c6d0a1d58 user: mistachkin tags: sqlar-shell-support)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/misc/fileio.c.
178
179
180
181
182
183
184

185
186
187
188
189
190
191
192
193
194
195
196
197
198
    rc = SQLITE_NOMEM;
  }else{
    int nCopy = (int)strlen(zCopy);
    int i = 1;

    while( rc==SQLITE_OK ){
      struct stat sStat;


      for(; zCopy[i]!='/' && i<nCopy; i++);
      if( i==nCopy ) break;
      zCopy[i] = '\0';

      rc = stat(zCopy, &sStat);
      if( rc!=0 ){
        if( mkdir(zCopy, mode & 0777) ) rc = SQLITE_ERROR;
      }else{
        if( !S_ISDIR(sStat.st_mode) ) rc = SQLITE_ERROR;
      }
      zCopy[i] = '/';
      i++;
    }







>





|
|







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
    rc = SQLITE_NOMEM;
  }else{
    int nCopy = (int)strlen(zCopy);
    int i = 1;

    while( rc==SQLITE_OK ){
      struct stat sStat;
      int rc2;

      for(; zCopy[i]!='/' && i<nCopy; i++);
      if( i==nCopy ) break;
      zCopy[i] = '\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;
      }
      zCopy[i] = '/';
      i++;
    }