gui, lib/config: Add default path for new folders (fixes #2157)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4192
This commit is contained in:
@@ -73,6 +73,7 @@ func TestDefaultValues(t *testing.T) {
|
||||
KCPSendWindowSize: 128,
|
||||
KCPUpdateIntervalMs: 25,
|
||||
KCPFastResend: false,
|
||||
DefaultFolderPath: "~",
|
||||
}
|
||||
|
||||
cfg := New(device1)
|
||||
@@ -221,6 +222,7 @@ func TestOverriddenValues(t *testing.T) {
|
||||
KCPSendWindowSize: 1280,
|
||||
KCPUpdateIntervalMs: 1000,
|
||||
KCPFastResend: true,
|
||||
DefaultFolderPath: "/media/syncthing",
|
||||
}
|
||||
|
||||
os.Unsetenv("STNOUPGRADE")
|
||||
|
||||
@@ -140,6 +140,7 @@ type OptionsConfiguration struct {
|
||||
KCPCongestionControl bool `xml:"kcpCongestionControl" json:"kcpCongestionControl" default:"true"`
|
||||
KCPSendWindowSize int `xml:"kcpSendWindowSize" json:"kcpSendWindowSize" default:"128"`
|
||||
KCPReceiveWindowSize int `xml:"kcpReceiveWindowSize" json:"kcpReceiveWindowSize" default:"128"`
|
||||
DefaultFolderPath string `xml:"defaultFolderPath" json:"defaultFolderPath" default:"~"`
|
||||
|
||||
DeprecatedUPnPEnabled bool `xml:"upnpEnabled,omitempty" json:"-"`
|
||||
DeprecatedUPnPLeaseM int `xml:"upnpLeaseMinutes,omitempty" json:"-"`
|
||||
|
||||
13
lib/config/testdata/overridenvalues.xml
vendored
13
lib/config/testdata/overridenvalues.xml
vendored
@@ -38,11 +38,12 @@
|
||||
<stunKeepaliveSeconds>10</stunKeepaliveSeconds>
|
||||
<stunServer>a.stun.com</stunServer>
|
||||
<stunServer>b.stun.com</stunServer>
|
||||
<defaultKCPEnabled>true</defaultKCPEnabled>
|
||||
<kcpCongestionControl>false</kcpCongestionControl>
|
||||
<kcpReceiveWindowSize>1280</kcpReceiveWindowSize>
|
||||
<kcpSendWindowSize>1280</kcpSendWindowSize>
|
||||
<kcpUpdateIntervalMs>1000</kcpUpdateIntervalMs>
|
||||
<kcpFastResend>true</kcpFastResend>
|
||||
<defaultKCPEnabled>true</defaultKCPEnabled>
|
||||
<kcpCongestionControl>false</kcpCongestionControl>
|
||||
<kcpReceiveWindowSize>1280</kcpReceiveWindowSize>
|
||||
<kcpSendWindowSize>1280</kcpSendWindowSize>
|
||||
<kcpUpdateIntervalMs>1000</kcpUpdateIntervalMs>
|
||||
<kcpFastResend>true</kcpFastResend>
|
||||
<defaultFolderPath>/media/syncthing</defaultFolderPath>
|
||||
</options>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user