mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
DisableSymlinks -> !SymlinksEnabled
This commit is contained in:
parent
8a34158fa4
commit
e7441ff6e8
@ -458,7 +458,7 @@ func syncthingMain() {
|
||||
|
||||
opts := cfg.Options()
|
||||
|
||||
if opts.DisableSymlinks {
|
||||
if !opts.SymlinksEnabled {
|
||||
symlinks.Supported = false
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ type OptionsConfiguration struct {
|
||||
KeepTemporariesH int `xml:"keepTemporariesH" default:"24"` // 0 for off
|
||||
CacheIgnoredFiles bool `xml:"cacheIgnoredFiles" default:"true"`
|
||||
ProgressUpdateIntervalS int `xml:"progressUpdateIntervalS" default:"5"`
|
||||
DisableSymlinks bool `xml:"disableSymlinks" default:"false"`
|
||||
SymlinksEnabled bool `xml:"symlinksEnabled" default:"true"`
|
||||
|
||||
Deprecated_RescanIntervalS int `xml:"rescanIntervalS,omitempty" json:"-"`
|
||||
Deprecated_UREnabled bool `xml:"urEnabled,omitempty" json:"-"`
|
||||
|
@ -53,7 +53,7 @@ func TestDefaultValues(t *testing.T) {
|
||||
KeepTemporariesH: 24,
|
||||
CacheIgnoredFiles: true,
|
||||
ProgressUpdateIntervalS: 5,
|
||||
DisableSymlinks: false,
|
||||
SymlinksEnabled: true,
|
||||
}
|
||||
|
||||
cfg := New(device1)
|
||||
@ -156,7 +156,7 @@ func TestOverriddenValues(t *testing.T) {
|
||||
KeepTemporariesH: 48,
|
||||
CacheIgnoredFiles: false,
|
||||
ProgressUpdateIntervalS: 10,
|
||||
DisableSymlinks: true,
|
||||
SymlinksEnabled: false,
|
||||
}
|
||||
|
||||
cfg, err := Load("testdata/overridenvalues.xml", device1)
|
||||
|
2
internal/config/testdata/overridenvalues.xml
vendored
2
internal/config/testdata/overridenvalues.xml
vendored
@ -20,6 +20,6 @@
|
||||
<keepTemporariesH>48</keepTemporariesH>
|
||||
<cacheIgnoredFiles>false</cacheIgnoredFiles>
|
||||
<progressUpdateIntervalS>10</progressUpdateIntervalS>
|
||||
<disableSymlinks>true</disableSymlinks>
|
||||
<symlinksEnabled>false</symlinksEnabled>
|
||||
</options>
|
||||
</configuration>
|
||||
|
@ -31,15 +31,15 @@ func expectEvent(w *events.Subscription, t *testing.T, size int) {
|
||||
t.Fatal("Unexpected error:", err)
|
||||
}
|
||||
if event.Type != events.DownloadProgress {
|
||||
t.Fatal("Unexpected event:", event)
|
||||
t.Fatal("Unexpected event:", event)
|
||||
}
|
||||
data := event.Data.(map[string]map[string]*pullerProgress)
|
||||
if len(data) != size {
|
||||
t.Fatal("Unexpected event data size:", data)
|
||||
t.Fatal("Unexpected event data size:", data)
|
||||
}
|
||||
}
|
||||
|
||||
func expectTimeout(w *events.Subscription, t *testing.T){
|
||||
func expectTimeout(w *events.Subscription, t *testing.T) {
|
||||
_, err := w.Poll(timeout)
|
||||
if err != events.ErrTimeout {
|
||||
t.Fatal("Unexpected non-Timeout error:", err)
|
||||
@ -78,7 +78,7 @@ func TestProgressEmitter(t *testing.T) {
|
||||
expectTimeout(w, t)
|
||||
|
||||
s.pullStarted()
|
||||
|
||||
|
||||
expectEvent(w, t, 1)
|
||||
expectTimeout(w, t)
|
||||
|
||||
|
@ -429,6 +429,7 @@
|
||||
<apikey>abc123</apikey>
|
||||
</gui>
|
||||
<options>
|
||||
<disableSymlinks>true</disableSymlinks>
|
||||
<listenAddress>127.0.0.1:22002</listenAddress>
|
||||
<globalAnnounceServer>announce.syncthing.net:22026</globalAnnounceServer>
|
||||
<globalAnnounceEnabled>false</globalAnnounceEnabled>
|
||||
|
Loading…
Reference in New Issue
Block a user