mirror of
https://github.com/octoleo/restic.git
synced 2024-12-27 20:45:19 +00:00
Fix missing Join calls
This commit is contained in:
parent
81ec7337e0
commit
d09e6d5b0f
@ -111,7 +111,7 @@ func Create(dir string, program string, args ...string) (*SFTP, error) {
|
||||
}
|
||||
|
||||
// test if config file already exists
|
||||
_, err = sftp.c.Lstat(dir + backend.Paths.Config)
|
||||
_, err = sftp.c.Lstat(Join(dir, backend.Paths.Config))
|
||||
if err == nil {
|
||||
return nil, errors.New("config file already exists")
|
||||
}
|
||||
@ -310,7 +310,7 @@ func Join(parts ...string) string {
|
||||
// Construct path for given backend.Type and name.
|
||||
func (r *SFTP) filename(t backend.Type, name string) string {
|
||||
if t == backend.Config {
|
||||
return Join(r.p + "config")
|
||||
return Join(r.p, "config")
|
||||
}
|
||||
|
||||
return Join(r.dirname(t, name), name)
|
||||
|
Loading…
Reference in New Issue
Block a user