mirror of
https://github.com/restic/restic.git
synced 2024-12-25 09:18:55 +00:00
Fix missing Join calls
This commit is contained in:
parent
81ec7337e0
commit
d09e6d5b0f
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue