diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 1c1f38793..3471c7b1d 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -292,16 +292,25 @@ func (options serveOptions) Run() error { os.Exit(svcutil.ExitError.AsInt()) } - if options.LogFile == "default" || options.LogFile == "" { + // Treat an explicitly empty log file name as no log file + if options.LogFile == "" { + options.LogFile = "-" + } + if options.LogFile != "default" { // We must set this *after* expandLocations above. - // Handling an empty value is for backwards compatibility (<1.4.1). - options.LogFile = locations.Get(locations.LogFile) + if err := locations.Set(locations.LogFile, options.LogFile); err != nil { + l.Warnln("Setting log file path:", err) + os.Exit(svcutil.ExitError.AsInt()) + } } - if options.DebugGUIAssetsDir == "" { + if options.DebugGUIAssetsDir != "" { // The asset dir is blank if STGUIASSETS wasn't set, in which case we // should look for extra assets in the default place. - options.DebugGUIAssetsDir = locations.Get(locations.GUIAssets) + if err := locations.Set(locations.GUIAssets, options.DebugGUIAssetsDir); err != nil { + l.Warnln("Setting GUI assets path:", err) + os.Exit(svcutil.ExitError.AsInt()) + } } if options.Version { @@ -310,7 +319,7 @@ func (options serveOptions) Run() error { } if options.Paths { - showPaths(options) + fmt.Print(locations.PrettyPaths()) return nil } @@ -612,7 +621,6 @@ func syncthingMain(options serveOptions) { } appOpts := syncthing.Options{ - AssetDir: options.DebugGUIAssetsDir, DeadlockTimeoutS: options.DebugDeadlockTimeout, NoUpgrade: options.NoUpgrade, ProfilerAddr: options.DebugProfilerListen, @@ -890,16 +898,6 @@ func cleanConfigDirectory() { } } -func showPaths(options serveOptions) { - fmt.Printf("Configuration file:\n\t%s\n\n", locations.Get(locations.ConfigFile)) - fmt.Printf("Database directory:\n\t%s\n\n", locations.Get(locations.Database)) - fmt.Printf("Device private key & certificate files:\n\t%s\n\t%s\n\n", locations.Get(locations.KeyFile), locations.Get(locations.CertFile)) - fmt.Printf("HTTPS private key & certificate files:\n\t%s\n\t%s\n\n", locations.Get(locations.HTTPSKeyFile), locations.Get(locations.HTTPSCertFile)) - fmt.Printf("Log file:\n\t%s\n\n", options.LogFile) - fmt.Printf("GUI override directory:\n\t%s\n\n", options.DebugGUIAssetsDir) - fmt.Printf("Default sync folder directory:\n\t%s\n\n", locations.Get(locations.DefFolder)) -} - func setPauseState(cfgWrapper config.Wrapper, paused bool) { _, err := cfgWrapper.Modify(func(cfg *config.Configuration) { for i := range cfg.Devices { diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index a118a24ae..d15a449ef 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -48,7 +48,7 @@ func monitorMain(options serveOptions) { var dst io.Writer = os.Stdout - logFile := options.LogFile + logFile := locations.Get(locations.LogFile) if logFile != "-" { if expanded, err := fs.ExpandTilde(logFile); err == nil { logFile = expanded diff --git a/gui/default/assets/css/overrides.css b/gui/default/assets/css/overrides.css index fcd8caa50..527c5cc59 100644 --- a/gui/default/assets/css/overrides.css +++ b/gui/default/assets/css/overrides.css @@ -420,6 +420,8 @@ ul.three-columns li, ul.two-columns li { height: 276px; } + table.table-auto td, + table.table-auto th, table.table-condensed td, table.table-condensed th { /* for mobile phones to allow linebreaks in long repro folder/shared with diff --git a/gui/default/index.html b/gui/default/index.html index 447472b2a..3a463ac6a 100644 --- a/gui/default/index.html +++ b/gui/default/index.html @@ -110,7 +110,7 @@ Help -
Syncthing is Free and Open Source Software licensed as MPL v2.0.
-Syncthing includes the following software or portions thereof:
-Syncthing includes the following software or portions thereof:
+User Home | +{{ about.paths['baseDir-userHome'] }} |
+
---|---|
Configuration Directory | +{{ about.paths['baseDir-config'] }} |
+
Configuration File | +{{ about.paths['config'] }} |
+
Device Certificate | +{{ about.paths['certFile'] }}
+ {{ about.paths['keyFile'] }} |
+
GUI / API HTTPS Certificate | +{{ about.paths['httpsCertFile'] }}
+ {{ about.paths['httpsKeyFile'] }} |
+
Database Location | +{{ about.paths['database'] }} |
+
Log File | +{{ about.paths['logFile'] }} |
+
GUI Override Directory | +{{ about.paths['guiAssets'] }} |
+