mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 02:18:44 -07:00
lib/versioner: Interpret versions path relative to folder path (fixes #4188)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4243
This commit is contained in:
parent
b79f8aceb8
commit
03c678a810
@ -51,11 +51,14 @@ func NewStaggered(folderID, folderPath string, params map[string]string) Version
|
||||
// Use custom path if set, otherwise .stversions in folderPath
|
||||
var versionsDir string
|
||||
if params["versionsPath"] == "" {
|
||||
l.Debugln("using default dir .stversions")
|
||||
versionsDir = filepath.Join(folderPath, ".stversions")
|
||||
} else {
|
||||
l.Debugln("using default dir .stversions")
|
||||
} else if filepath.IsAbs(params["versionsPath"]) {
|
||||
l.Debugln("using dir", params["versionsPath"])
|
||||
versionsDir = params["versionsPath"]
|
||||
} else {
|
||||
versionsDir = filepath.Join(folderPath, params["versionsPath"])
|
||||
l.Debugln("using dir", versionsDir)
|
||||
}
|
||||
|
||||
s := &Staggered{
|
||||
|
Loading…
Reference in New Issue
Block a user