Fossil

Check-in [af66e2cf]
Login

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

Overview
Comment:Fix invalid directory listings when some siblings directory names are prefixes of others. Ticket [32cfbf0aa4abf964]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: af66e2cf3a6c72001258a532bd63a9b96e2c2cba
User & Date: drh 2011-03-07 18:49:32
Context
2011-03-08
12:27
The client-side on a sync silently ignores unknown pragmas. check-in: eb82de66 user: drh tags: trunk
2011-03-07
18:49
Fix invalid directory listings when some siblings directory names are prefixes of others. Ticket [32cfbf0aa4abf964] check-in: af66e2cf user: drh tags: trunk
18:32
Disallow the use of "i", "l", and "o" characters in hexadecimal constants. check-in: c320b850 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/browse.c.

208
209
210
211
212
213
214

215



216
217
218
219
220
221
222
    int c;

    db_prepare(&ins,
       "INSERT OR IGNORE INTO localfiles VALUES(pathelement(:x,0), :u)"
    );
    manifest_file_rewind(pM);
    while( (pFile = manifest_file_next(pM,0))!=0 ){

      if( nD>0 && memcmp(pFile->zName, zD, nD-1)!=0 ) continue;



      if( pPrev
       && memcmp(&pFile->zName[nD],&pPrev->zName[nD],nPrev)==0
       && (pFile->zName[nD+nPrev]==0 || pFile->zName[nD+nPrev]=='/')
      ){
        continue;
      }
      db_bind_text(&ins, ":x", &pFile->zName[nD]);







>
|
>
>
>







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
    int c;

    db_prepare(&ins,
       "INSERT OR IGNORE INTO localfiles VALUES(pathelement(:x,0), :u)"
    );
    manifest_file_rewind(pM);
    while( (pFile = manifest_file_next(pM,0))!=0 ){
      if( nD>0 
       && (memcmp(pFile->zName, zD, nD-1)!=0 || pFile->zName[nD-1]!='/')
      ){
        continue;
      }
      if( pPrev
       && memcmp(&pFile->zName[nD],&pPrev->zName[nD],nPrev)==0
       && (pFile->zName[nD+nPrev]==0 || pFile->zName[nD+nPrev]=='/')
      ){
        continue;
      }
      db_bind_text(&ins, ":x", &pFile->zName[nD]);