Fossil SCM

Fix the web-browser user setting so that it actually works.

drh 2008-10-27 15:34 trunk
Commit 3f5ef308feee511345c4dbbcf1713858e3c68e7a
1 file changed +2 -1
+2 -1
--- src/main.c
+++ src/main.c
@@ -724,11 +724,10 @@
724724
if( g.argc==2 ){
725725
db_must_be_within_tree();
726726
}else{
727727
db_open_repository(g.argv[2]);
728728
}
729
- db_close();
730729
#ifndef __MINGW32__
731730
/* Unix implementation */
732731
if( g.argv[1][0]=='u' ){
733732
#if !defined(__DARWIN__) && !defined(__APPLE__)
734733
zBrowser = db_get("web-browser", "firefox");
@@ -735,10 +734,11 @@
735734
#else
736735
zBrowser = db_get("web-browser", "open");
737736
#endif
738737
zBrowserCmd = mprintf("%s http://localhost:%d/ &", zBrowser, iPort);
739738
}
739
+ db_close();
740740
if( cgi_http_server(iPort, zBrowserCmd) ){
741741
fossil_fatal("unable to listen on TCP socket %d", iPort);
742742
}
743743
g.httpIn = stdin;
744744
g.httpOut = stdout;
@@ -757,8 +757,9 @@
757757
/* Win32 implementation */
758758
if( g.argv[1][0]=='u' ){
759759
zBrowser = db_get("web-browser", "start");
760760
zBrowserCmd = mprintf("%s http://127.0.0.1:%d/", zBrowser, iPort);
761761
}
762
+ db_close();
762763
win32_http_server(iPort, zBrowserCmd);
763764
#endif
764765
}
765766
--- src/main.c
+++ src/main.c
@@ -724,11 +724,10 @@
724 if( g.argc==2 ){
725 db_must_be_within_tree();
726 }else{
727 db_open_repository(g.argv[2]);
728 }
729 db_close();
730 #ifndef __MINGW32__
731 /* Unix implementation */
732 if( g.argv[1][0]=='u' ){
733 #if !defined(__DARWIN__) && !defined(__APPLE__)
734 zBrowser = db_get("web-browser", "firefox");
@@ -735,10 +734,11 @@
735 #else
736 zBrowser = db_get("web-browser", "open");
737 #endif
738 zBrowserCmd = mprintf("%s http://localhost:%d/ &", zBrowser, iPort);
739 }
 
740 if( cgi_http_server(iPort, zBrowserCmd) ){
741 fossil_fatal("unable to listen on TCP socket %d", iPort);
742 }
743 g.httpIn = stdin;
744 g.httpOut = stdout;
@@ -757,8 +757,9 @@
757 /* Win32 implementation */
758 if( g.argv[1][0]=='u' ){
759 zBrowser = db_get("web-browser", "start");
760 zBrowserCmd = mprintf("%s http://127.0.0.1:%d/", zBrowser, iPort);
761 }
 
762 win32_http_server(iPort, zBrowserCmd);
763 #endif
764 }
765
--- src/main.c
+++ src/main.c
@@ -724,11 +724,10 @@
724 if( g.argc==2 ){
725 db_must_be_within_tree();
726 }else{
727 db_open_repository(g.argv[2]);
728 }
 
729 #ifndef __MINGW32__
730 /* Unix implementation */
731 if( g.argv[1][0]=='u' ){
732 #if !defined(__DARWIN__) && !defined(__APPLE__)
733 zBrowser = db_get("web-browser", "firefox");
@@ -735,10 +734,11 @@
734 #else
735 zBrowser = db_get("web-browser", "open");
736 #endif
737 zBrowserCmd = mprintf("%s http://localhost:%d/ &", zBrowser, iPort);
738 }
739 db_close();
740 if( cgi_http_server(iPort, zBrowserCmd) ){
741 fossil_fatal("unable to listen on TCP socket %d", iPort);
742 }
743 g.httpIn = stdin;
744 g.httpOut = stdout;
@@ -757,8 +757,9 @@
757 /* Win32 implementation */
758 if( g.argv[1][0]=='u' ){
759 zBrowser = db_get("web-browser", "start");
760 zBrowserCmd = mprintf("%s http://127.0.0.1:%d/", zBrowser, iPort);
761 }
762 db_close();
763 win32_http_server(iPort, zBrowserCmd);
764 #endif
765 }
766

Keyboard Shortcuts

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