summaryrefslogtreecommitdiffstats
path: root/lib/syncthing
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syncthing')
-rw-r--r--lib/syncthing/folder-st.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/syncthing/folder-st.go b/lib/syncthing/folder-st.go
index a372b6f..7e1fe55 100644
--- a/lib/syncthing/folder-st.go
+++ b/lib/syncthing/folder-st.go
@@ -2,6 +2,7 @@ package st
import (
"fmt"
+ "os"
"path/filepath"
"strings"
@@ -129,7 +130,15 @@ func (f *STFolder) ConvPathSvr2Cli(s string) string {
// Remove a folder
func (f *STFolder) Remove() error {
- return f.st.FolderDelete(f.stfConfig.ID)
+ err := f.st.FolderDelete(f.stfConfig.ID)
+
+ // Delete folder on server side
+ err2 := os.RemoveAll(f.GetFullPath(""))
+
+ if err != nil {
+ return err
+ }
+ return err2
}
// RegisterEventChange requests registration for folder event change