mirror of
https://github.com/octoleo/syncthing.git
synced 2025-04-02 15:51:51 +00:00
Ensuring path separator at the end of the folder path. (fixes #1262)
This commit is contained in:
parent
6d942635af
commit
fcb1a98129
@ -26,6 +26,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/calmh/logger"
|
"github.com/calmh/logger"
|
||||||
"github.com/syncthing/protocol"
|
"github.com/syncthing/protocol"
|
||||||
@ -261,6 +262,10 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !strings.HasSuffix(folder.Path, string(filepath.Separator)) {
|
||||||
|
folder.Path += string(filepath.Separator)
|
||||||
|
}
|
||||||
|
|
||||||
if folder.ID == "" {
|
if folder.ID == "" {
|
||||||
folder.ID = "default"
|
folder.ID = "default"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user