mirror of
https://github.com/restic/restic.git
synced 2025-07-29 20:13:36 +00:00
sftp: Improve error handling for non-existing dir
This commit is contained in:
parent
3686b1ffe5
commit
f9a934759f
@ -141,6 +141,10 @@ func (r *SFTP) checkDataSubdirs() error {
|
|||||||
|
|
||||||
// check if all paths for data/ exist
|
// check if all paths for data/ exist
|
||||||
entries, err := r.c.ReadDir(datadir)
|
entries, err := r.c.ReadDir(datadir)
|
||||||
|
if r.IsNotExist(err) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user