diff --git a/gui/default/syncthing/folder/editFolderModalView.html b/gui/default/syncthing/folder/editFolderModalView.html index 2af15750..cc2aab45 100644 --- a/gui/default/syncthing/folder/editFolderModalView.html +++ b/gui/default/syncthing/folder/editFolderModalView.html @@ -176,7 +176,7 @@
Path where versions should be stored (leave empty for the default .stversions directory in the shared folder).
An external command handles the versioning. It has to remove the file from the shared folder.
+An external command handles the versioning. It has to remove the file from the shared folder. If the path to the application contains spaces, it should be quoted.
diff --git a/lib/versioner/external.go b/lib/versioner/external.go index 3503f4d8..5ab4edc3 100644 --- a/lib/versioner/external.go +++ b/lib/versioner/external.go @@ -10,6 +10,7 @@ import ( "errors" "os" "os/exec" + "runtime" "strings" "github.com/syncthing/syncthing/lib/fs" @@ -30,6 +31,10 @@ type External struct { func NewExternal(folderID string, filesystem fs.Filesystem, params map[string]string) Versioner { command := params["command"] + if runtime.GOOS == "windows" { + command = strings.Replace(command, `\`, `\\`, -1) + } + s := External{ command: command, filesystem: filesystem,