Archived
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:
1 parent
b79f8aceb8
commit
03c678a810
1 file changed
+5
-2
@@ -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{
|
||||
|
||||
Reference in new issue
Block a user