Jelajahi Sumber

Merge pull request #1546 from Zillode/fix-reset-dir

Fix -reset folder target
Jakob Borg 10 tahun lalu
induk
melakukan
c7f6f4f48d
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      cmd/syncthing/main.go

+ 1 - 1
cmd/syncthing/main.go

@@ -830,7 +830,7 @@ func resetFolders() {
 	for _, folder := range cfg.Folders() {
 		if _, err := os.Stat(folder.Path); err == nil {
 			base := filepath.Base(folder.Path)
-			dir := filepath.Dir(filepath.Join(folder.Path, ".."))
+			dir := filepath.Dir(folder.Path)
 			l.Infof("Reset: Moving %s -> %s", folder.Path, filepath.Join(dir, base+suffix))
 			os.Rename(folder.Path, filepath.Join(dir, base+suffix))
 		}