Add option to disable symlinks (fixes #1017)
This commit is contained in:
@@ -45,6 +45,7 @@ import (
|
||||
"github.com/syncthing/syncthing/internal/model"
|
||||
"github.com/syncthing/syncthing/internal/osutil"
|
||||
"github.com/syncthing/syncthing/internal/protocol"
|
||||
"github.com/syncthing/syncthing/internal/symlinks"
|
||||
"github.com/syncthing/syncthing/internal/upgrade"
|
||||
"github.com/syncthing/syncthing/internal/upnp"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
@@ -458,6 +459,10 @@ func syncthingMain() {
|
||||
|
||||
opts := cfg.Options()
|
||||
|
||||
if opts.DisableSymlinks {
|
||||
symlinks.Supported = false
|
||||
}
|
||||
|
||||
if opts.MaxSendKbps > 0 {
|
||||
writeRateLimit = ratelimit.NewBucketWithRate(float64(1000*opts.MaxSendKbps), int64(5*1000*opts.MaxSendKbps))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user