Improve error message when source remote isn't found in sync #848

This commit is contained in:
Nick Craig-Wood 2016-11-05 18:03:55 +00:00
parent e162377ca3
commit ff41b0d435
2 changed files with 8 additions and 0 deletions

View file

@ -420,6 +420,9 @@ func readFilesMap(fs Fs, includeAll bool, dir string) (files map[string]Object,
normalised[normalisedRemote] = struct{}{}
return nil
})
if err != nil {
err = errors.Wrapf(err, "error listing: %s", fs)
}
return files, err
}

View file

@ -5,6 +5,8 @@ package fs
import (
"sync"
"time"
"github.com/pkg/errors"
)
type syncCopyMove struct {
@ -103,6 +105,9 @@ func (s *syncCopyMove) readSrcUsingChan() {
return nil
})
close(s.srcFilesChan)
if err != nil {
err = errors.Wrapf(err, "error listing source: %s", s.fsrc)
}
s.srcFilesResult <- err
}