sftp: Improve error handling for non-existing dir

This commit is contained in:
Alexander Neumann 2017-08-27 20:52:32 +02:00
parent 3686b1ffe5
commit f9a934759f
1 changed files with 4 additions and 0 deletions

View File

@ -141,6 +141,10 @@ func (r *SFTP) checkDataSubdirs() error {
// check if all paths for data/ exist
entries, err := r.c.ReadDir(datadir)
if r.IsNotExist(err) {
return nil
}
if err != nil {
return err
}