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{}{} normalised[normalisedRemote] = struct{}{}
return nil return nil
}) })
if err != nil {
err = errors.Wrapf(err, "error listing: %s", fs)
}
return files, err return files, err
} }

View File

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