Fossil

Check-in [b9b9d7e739]
Login

Check-in [b9b9d7e739]

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

Overview
Comment:Do not attempt to attach the local database while processing "ckout" in the /doc page if that database is not already open.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b9b9d7e739c57697bf46227f87017e33f8303b52
User & Date: drh 2015-07-15 10:38:24.492
Context
2015-07-15
15:34
Fix "fossil stash" so that it works with the undo enhancements. ... (check-in: 3c0d8c2679 user: drh tags: trunk)
10:38
Do not attempt to attach the local database while processing "ckout" in the /doc page if that database is not already open. ... (check-in: b9b9d7e739 user: drh tags: trunk)
10:33
Fix a typo in a comment. No changes to code. ... (check-in: d1a8238783 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/doc.c.
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
  blob_init(&title, 0, 0);
  db_begin_transaction();
  while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){
    zName = P("name");
    if( zName==0 || zName[0]==0 ) zName = "tip/index.wiki";
    for(i=0; zName[i] && zName[i]!='/'; i++){}
    zCheckin = mprintf("%.*s", i, zName);
    if( fossil_strcmp(zCheckin,"ckout")==0 && db_open_local(0)==0 ){
      zCheckin = "tip";
    }
    if( nMiss==ArraySize(azSuffix) ){
      zName = "404.md";
    }else if( zName[i]==0 ){
      assert( nMiss>=0 && nMiss<ArraySize(azSuffix) );
      zName = azSuffix[nMiss];







|







549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
  blob_init(&title, 0, 0);
  db_begin_transaction();
  while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){
    zName = P("name");
    if( zName==0 || zName[0]==0 ) zName = "tip/index.wiki";
    for(i=0; zName[i] && zName[i]!='/'; i++){}
    zCheckin = mprintf("%.*s", i, zName);
    if( fossil_strcmp(zCheckin,"ckout")==0 && g.localOpen==0 ){
      zCheckin = "tip";
    }
    if( nMiss==ArraySize(azSuffix) ){
      zName = "404.md";
    }else if( zName[i]==0 ){
      assert( nMiss>=0 && nMiss<ArraySize(azSuffix) );
      zName = azSuffix[nMiss];