Fossil SCM
Fix the /ckout page so that it works correctly even when invoked from a subdirectory of the checkout root. [forum:/forumpost/af6086e46b|Forum post af6086e46b].
Commit
242c2d184438917ec4b6fbbfe0ef6d8ad4218a7836e53139c555355063bc2338
Parent
3d2f1886a3e0d83…
1 file changed
+1
+1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -628,10 +628,11 @@ | ||
| 628 | 628 | |
| 629 | 629 | if( !db_open_local(0) || !cgi_is_loopback(g.zIpAddr) ){ |
| 630 | 630 | cgi_redirect("%R/home"); |
| 631 | 631 | return; |
| 632 | 632 | } |
| 633 | + file_chdir(g.zLocalRoot, 0); | |
| 633 | 634 | diffType = preferred_diff_type(); |
| 634 | 635 | pCfg = construct_diff_flags(diffType, &DCfg); |
| 635 | 636 | vid = db_lget_int("checkout", 0); |
| 636 | 637 | db_unprotect(PROTECT_ALL); |
| 637 | 638 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 638 | 639 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -628,10 +628,11 @@ | |
| 628 | |
| 629 | if( !db_open_local(0) || !cgi_is_loopback(g.zIpAddr) ){ |
| 630 | cgi_redirect("%R/home"); |
| 631 | return; |
| 632 | } |
| 633 | diffType = preferred_diff_type(); |
| 634 | pCfg = construct_diff_flags(diffType, &DCfg); |
| 635 | vid = db_lget_int("checkout", 0); |
| 636 | db_unprotect(PROTECT_ALL); |
| 637 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 638 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -628,10 +628,11 @@ | |
| 628 | |
| 629 | if( !db_open_local(0) || !cgi_is_loopback(g.zIpAddr) ){ |
| 630 | cgi_redirect("%R/home"); |
| 631 | return; |
| 632 | } |
| 633 | file_chdir(g.zLocalRoot, 0); |
| 634 | diffType = preferred_diff_type(); |
| 635 | pCfg = construct_diff_flags(diffType, &DCfg); |
| 636 | vid = db_lget_int("checkout", 0); |
| 637 | db_unprotect(PROTECT_ALL); |
| 638 | vfile_check_signature(vid, CKSIG_ENOTFILE); |
| 639 |