mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-14 01:04:14 +00: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
|
// Use custom path if set, otherwise .stversions in folderPath
|
||||||
var versionsDir string
|
var versionsDir string
|
||||||
if params["versionsPath"] == "" {
|
if params["versionsPath"] == "" {
|
||||||
l.Debugln("using default dir .stversions")
|
|
||||||
versionsDir = filepath.Join(folderPath, ".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"])
|
l.Debugln("using dir", params["versionsPath"])
|
||||||
versionsDir = params["versionsPath"]
|
versionsDir = params["versionsPath"]
|
||||||
|
} else {
|
||||||
|
versionsDir = filepath.Join(folderPath, params["versionsPath"])
|
||||||
|
l.Debugln("using dir", versionsDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
s := &Staggered{
|
s := &Staggered{
|
||||||
|
Loading…
Reference in New Issue
Block a user