all: Add copy-on-write filesystem support (fixes #4271) (#6746)

This commit is contained in:
Audrius Butkevicius
2020-06-18 08:15:47 +02:00
committed by GitHub
parent 273cc9cef8
commit 4812fd3ec1
26 changed files with 858 additions and 84 deletions
+4 -3
View File
@@ -14,6 +14,7 @@ import (
"strings"
"time"
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/fs"
"github.com/kballard/go-shellquote"
@@ -29,8 +30,8 @@ type external struct {
filesystem fs.Filesystem
}
func newExternal(filesystem fs.Filesystem, params map[string]string) Versioner {
command := params["command"]
func newExternal(cfg config.FolderConfiguration) Versioner {
command := cfg.Versioning.Params["command"]
if runtime.GOOS == "windows" {
command = strings.Replace(command, `\`, `\\`, -1)
@@ -38,7 +39,7 @@ func newExternal(filesystem fs.Filesystem, params map[string]string) Versioner {
s := external{
command: command,
filesystem: filesystem,
filesystem: cfg.Filesystem(),
}
l.Debugf("instantiated %#v", s)