397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
|
if( zName[i]==0 ){
zName = "index.wiki";
}else{
zName += i;
}
while( zName[0]=='/' ){ zName++; }
g.zPath = mprintf("%s/%s/%s", g.zPath, zCheckin, zName);
if( !file_is_simple_pathname(zName, 1) ){
if( sqlite3_strglob("*/", zName)==0 ){
zName = mprintf("%sindex.wiki", zName);
if( !file_is_simple_pathname(zName, 1) ){
goto doc_not_found;
}
}else{
goto doc_not_found;
}
}
zOrigName = zName;
if( fossil_strcmp(zCheckin,"ckout")==0 && db_open_local(0)==0 ){
sqlite3_snprintf(sizeof(zCheckin), zCheckin, "tip");
}
if( fossil_strcmp(zCheckin,"ckout")==0 ){
/* Read from the local checkout */
char *zFullpath;
db_must_be_within_tree();
|
>
|
<
|
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
|
if( zName[i]==0 ){
zName = "index.wiki";
}else{
zName += i;
}
while( zName[0]=='/' ){ zName++; }
g.zPath = mprintf("%s/%s/%s", g.zPath, zCheckin, zName);
zOrigName = zName;
if( !file_is_simple_pathname(zName, 1) ){
if( sqlite3_strglob("*/", zName)==0 ){
zOrigName = zName = mprintf("%sindex.wiki", zName);
if( !file_is_simple_pathname(zName, 1) ){
goto doc_not_found;
}
}else{
goto doc_not_found;
}
}
if( fossil_strcmp(zCheckin,"ckout")==0 && db_open_local(0)==0 ){
sqlite3_snprintf(sizeof(zCheckin), zCheckin, "tip");
}
if( fossil_strcmp(zCheckin,"ckout")==0 ){
/* Read from the local checkout */
char *zFullpath;
db_must_be_within_tree();
|