Fossil

Check-in [537a1394]
Login

Check-in [537a1394]

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

Overview
Comment:Remove a faulty assert() statement inserted by check-in [9c1199d723e0acda].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 537a1394d8cfd3429e93ca85965ab90b268bae28aaa3e34158c10aee9f2cc071
User & Date: drh 2022-02-03 00:55:17
Context
2022-02-04
11:28
On the repository list page, show Last Modified as 'unknown' for a repository with no entries in the event table (see forum report), and sort it still as oldest. ... (check-in: 9e420127 user: danield tags: trunk)
2022-02-03
00:55
Remove a faulty assert() statement inserted by check-in [9c1199d723e0acda]. ... (check-in: 537a1394 user: drh tags: trunk)
2022-02-02
21:50
Fix typo in defcsp.md: DSP --> CSP ... (check-in: 9ce4dd0d user: mgagnon tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/repolist.c.

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
    while( db_step(&q)==SQLITE_ROW ){
      const char *zName = db_column_text(&q, 0);
      int nName = (int)strlen(zName);
      char *zUrl;
      char *zAge;
      char *zFull;
      RepoInfo x;
      int iAge;
      if( nName<7 ) continue;
      zUrl = sqlite3_mprintf("%.*s", nName-7, zName);
      if( zName[0]=='/'
#ifdef _WIN32
          || sqlite3_strglob("[a-zA-Z]:/*", zName)==0
#endif
      ){







|







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
    while( db_step(&q)==SQLITE_ROW ){
      const char *zName = db_column_text(&q, 0);
      int nName = (int)strlen(zName);
      char *zUrl;
      char *zAge;
      char *zFull;
      RepoInfo x;
      sqlite3_int64 iAge;
      if( nName<7 ) continue;
      zUrl = sqlite3_mprintf("%.*s", nName-7, zName);
      if( zName[0]=='/'
#ifdef _WIN32
          || sqlite3_strglob("[a-zA-Z]:/*", zName)==0
#endif
      ){
203
204
205
206
207
208
209
210
211
212
213


214
215
216
217
218
219
220
        continue;
      }
      if( x.isRepolistSkin==2 && !allRepo ){
        /* Repositories with repolist-skin==2 are omitted from directory
        ** scan lists, but included in "fossil all ui" lists */
        continue;
      }
      /* Assert that the following cast will not narrow in fact. */
      assert((rNow - x.rMTime)<=(((unsigned)~0)>>1)/86400.0);
      iAge = (int)((rNow - x.rMTime)*86400);
      if( iAge<0 ) x.rMTime = rNow;


      zAge = human_readable_age(rNow - x.rMTime);
      blob_append_sql(&html, "<tr><td valign='top'>");
      if( sqlite3_strglob("*.fossil", zName)!=0 ){
        /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands
        ** do not work for repositories whose names do not end in ".fossil".
        ** So do not hyperlink those cases. */
        blob_append_sql(&html,"%h",zName);







|
|
|
|
>
>







203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
        continue;
      }
      if( x.isRepolistSkin==2 && !allRepo ){
        /* Repositories with repolist-skin==2 are omitted from directory
        ** scan lists, but included in "fossil all ui" lists */
        continue;
      }
      if( rNow <= x.rMTime ){
        x.rMTime = rNow;
      }else if( x.rMTime<0.0 ){
        x.rMTime = rNow;
      }
      iAge = (int)(rNow - x.rMTime)*86400;
      zAge = human_readable_age(rNow - x.rMTime);
      blob_append_sql(&html, "<tr><td valign='top'>");
      if( sqlite3_strglob("*.fossil", zName)!=0 ){
        /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands
        ** do not work for repositories whose names do not end in ".fossil".
        ** So do not hyperlink those cases. */
        blob_append_sql(&html,"%h",zName);