DisableSymlinks -> !SymlinksEnabled

This commit is contained in:
Jakob Borg 2014-12-01 11:26:54 +01:00
parent 8a34158fa4
commit e7441ff6e8
6 changed files with 10 additions and 9 deletions

View File

@ -458,7 +458,7 @@ func syncthingMain() {
opts := cfg.Options()
if opts.DisableSymlinks {
if !opts.SymlinksEnabled {
symlinks.Supported = false
}

View File

@ -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:"-"`

View File

@ -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)

View File

@ -20,6 +20,6 @@
<keepTemporariesH>48</keepTemporariesH>
<cacheIgnoredFiles>false</cacheIgnoredFiles>
<progressUpdateIntervalS>10</progressUpdateIntervalS>
<disableSymlinks>true</disableSymlinks>
<symlinksEnabled>false</symlinksEnabled>
</options>
</configuration>

View File

@ -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)

View File

@ -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>