Browse Source

Merge pull request #1290 from krozycki/master

Ensuring path separator at the end of the folder path. (fixes #1262)
Jakob Borg 11 years ago
parent
commit
fd507e3e41
1 changed files with 5 additions and 0 deletions
  1. 5 0
      internal/config/config.go

+ 5 - 0
internal/config/config.go

@@ -26,6 +26,7 @@ import (
 	"reflect"
 	"sort"
 	"strconv"
+	"strings"
 
 	"github.com/calmh/logger"
 	"github.com/syncthing/protocol"
@@ -261,6 +262,10 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
 			continue
 		}
 
+		if !strings.HasSuffix(folder.Path, string(filepath.Separator)) {
+			folder.Path += string(filepath.Separator)
+		}
+
 		if folder.ID == "" {
 			folder.ID = "default"
 		}