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].

drh 2024-12-13 12:00 trunk
Commit 242c2d184438917ec4b6fbbfe0ef6d8ad4218a7836e53139c555355063bc2338
1 file changed +1
+1
--- src/info.c
+++ src/info.c
@@ -628,10 +628,11 @@
628628
629629
if( !db_open_local(0) || !cgi_is_loopback(g.zIpAddr) ){
630630
cgi_redirect("%R/home");
631631
return;
632632
}
633
+ file_chdir(g.zLocalRoot, 0);
633634
diffType = preferred_diff_type();
634635
pCfg = construct_diff_flags(diffType, &DCfg);
635636
vid = db_lget_int("checkout", 0);
636637
db_unprotect(PROTECT_ALL);
637638
vfile_check_signature(vid, CKSIG_ENOTFILE);
638639
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button