Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Reverted a check for the repository size being an even multiple of 512 bytes as a test for validity. Introduced in [/info/bd7f2727ba25912e | an omnibus commit] for obscure reasons, it causes some valid clone operations to fail, as originally reported [forum:/forumpost/16880a28aad1a868 | on the forum]. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
4a2d0e78781c9a1056d60a86cce60737 |
| User & Date: | wyoung 2022-02-28 19:23:44.731 |
Context
|
2022-02-28
| ||
| 20:35 | Simplified an overly-clever test for a file size being an even multiple of 512 bytes. Compiler Explorer says GCC 11 generates the same code both ways, at least, and it isn't in a CPU-critical code path anyway. Also added a comment referring to this new, simplified code, to prevent a recurrence of the problem fixed by the prior commit. check-in: c67d54010d user: wyoung tags: trunk | |
| 19:23 | Reverted a check for the repository size being an even multiple of 512 bytes as a test for validity. Introduced in [/info/bd7f2727ba25912e | an omnibus commit] for obscure reasons, it causes some valid clone operations to fail, as originally reported [forum:/forumpost/16880a28aad1a868 | on the forum]. check-in: 4a2d0e7878 user: wyoung tags: trunk | |
| 14:05 | /md_rules: replaced 'complex' with 'more', per /chat discussion. check-in: 369d7d1a20 user: stephan tags: trunk | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
2177 2178 2179 2180 2181 2182 2183 |
/*
** Open the repository database given by zDbName. If zDbName==NULL then
** get the name from the already open local database.
*/
void db_open_repository(const char *zDbName){
| < | < < < | 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 |
/*
** Open the repository database given by zDbName. If zDbName==NULL then
** get the name from the already open local database.
*/
void db_open_repository(const char *zDbName){
if( g.repositoryOpen ) return;
if( zDbName==0 ){
if( g.localOpen ){
zDbName = db_repository_filename();
}
if( zDbName==0 ){
db_err("unable to find the name of a repository database");
}
}
if( file_access(zDbName, R_OK) || file_size(zDbName, ExtFILE)<1024 ){
if( file_access(zDbName, F_OK) ){
#ifdef FOSSIL_ENABLE_JSON
g.json.resultCode = FSL_JSON_E_DB_NOT_FOUND;
#endif
fossil_fatal("repository does not exist or"
" is in an unreadable directory: %s", zDbName);
}else if( file_access(zDbName, R_OK) ){
|
| ︙ | ︙ |