mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-17 02:48:57 -07:00
Default GUI override dir
If STGUIASSETS is not set, look for assets in $confdir/gui by default. Simplifies deploying overrides and stuff.
This commit is contained in:
parent
1437952aee
commit
7c23b32de3
@ -31,6 +31,7 @@ const (
|
|||||||
locCsrfTokens = "csrfTokens"
|
locCsrfTokens = "csrfTokens"
|
||||||
locPanicLog = "panicLog"
|
locPanicLog = "panicLog"
|
||||||
locAuditLog = "auditLog"
|
locAuditLog = "auditLog"
|
||||||
|
locGUIAssets = "GUIAssets"
|
||||||
locDefFolder = "defFolder"
|
locDefFolder = "defFolder"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -52,6 +53,7 @@ var locations = map[locationEnum]string{
|
|||||||
locCsrfTokens: "${config}/csrftokens.txt",
|
locCsrfTokens: "${config}/csrftokens.txt",
|
||||||
locPanicLog: "${config}/panic-${timestamp}.log",
|
locPanicLog: "${config}/panic-${timestamp}.log",
|
||||||
locAuditLog: "${config}/audit-${timestamp}.log",
|
locAuditLog: "${config}/audit-${timestamp}.log",
|
||||||
|
locGUIAssets: "${config}/gui",
|
||||||
locDefFolder: "${home}/Sync",
|
locDefFolder: "${home}/Sync",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,6 +252,10 @@ func main() {
|
|||||||
l.Fatalln(err)
|
l.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if guiAssets == "" {
|
||||||
|
guiAssets = locations[locGUIAssets]
|
||||||
|
}
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
if logFile == "" {
|
if logFile == "" {
|
||||||
// Use the default log file location
|
// Use the default log file location
|
||||||
|
Loading…
Reference in New Issue
Block a user