Fossil

Check-in [69650f2963]
Login

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

Overview
Comment:Better error message when a CGI configuration specifies a non-existant or unreadable repository.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 69650f2963ebabb601f7c0f5dbaa114819358e6a
User & Date: drh 2008-05-22 15:31:38.000
Context
2008-05-23
12:24
removed USER stuff. Reorganized. i would have SWORN that i checked this in yesterday. check-in: ab5ab46206 user: stephan tags: trunk
2008-05-22
15:31
Better error message when a CGI configuration specifies a non-existant or unreadable repository. check-in: 69650f2963 user: drh tags: trunk
13:58
Begin adding the new "configure" command. check-in: e06ae9f6d2 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/db.c.
657
658
659
660
661
662
663






664

665
666
667
668
669
670
671
      zDbName = db_lget("repository", 0);
    }
    if( zDbName==0 ){
      db_err("unable to find the name of a repository database");
    }
  }
  if( access(zDbName, R_OK) || file_size(zDbName)<1024 ){






    fossil_panic("no such repository: %s", zDbName);

  }
  db_open_or_attach(zDbName, "repository");
  g.repositoryOpen = 1;
  g.zRepositoryName = mprintf("%s", zDbName);
}

/*







>
>
>
>
>
>
|
>







657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
      zDbName = db_lget("repository", 0);
    }
    if( zDbName==0 ){
      db_err("unable to find the name of a repository database");
    }
  }
  if( access(zDbName, R_OK) || file_size(zDbName)<1024 ){
    if( access(zDbName, 0) ){
      fossil_panic("repository does not exists or"
                   " is in an unreadable directory: %s", zDbName);
    }else if( access(zDbName, R_OK) ){
      fossil_panic("read permission denied for repository %s", zDbName);
    }else{
      fossil_panic("not a valid repository: %s", zDbName);
    }
  }
  db_open_or_attach(zDbName, "repository");
  g.repositoryOpen = 1;
  g.zRepositoryName = mprintf("%s", zDbName);
}

/*