Ensuring path separator at the end of the folder path. (fixes #1262)

This commit is contained in:
Karol Różycki 2015-01-23 00:22:30 +01:00
parent 6d942635af
commit fcb1a98129

View File

@ -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"
}