Fossil

Check-in [6e59eb11]
Login

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

Overview
Comment:Fix the display of file and directory listings so that it works correctly even when one file in a directory is a prefix of another. Ticket [8e13d170f2d6d6e3].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6e59eb117f1e1f807427a9358005d5feaee594d7
User & Date: drh 2011-01-25 21:59:35
Context
2011-01-25
23:17
For the "stash save" command, take care to avoid reverting everything if no files were stashed. Ticket [fbfe43e153ee0e1d]. check-in: 2dd7b4b5 user: drh tags: trunk
21:59
Fix the display of file and directory listings so that it works correctly even when one file in a directory is a prefix of another. Ticket [8e13d170f2d6d6e3]. check-in: 6e59eb11 user: drh tags: trunk
19:03
Update the built-in SQLite to the latest 3.7.5 beta. check-in: 07556099 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

    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 ){


        continue;
      }
      db_bind_text(&ins, ":x", &pFile->zName[nD]);
      db_bind_text(&ins, ":u", pFile->zUuid);
      db_step(&ins);
      db_reset(&ins);
      pPrev = pFile;







>
|
>
>







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

    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]);
      db_bind_text(&ins, ":u", pFile->zUuid);
      db_step(&ins);
      db_reset(&ins);
      pPrev = pFile;