From ff41b0d4350a43adcfb6cf46b8f3aa8f675ad819 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 5 Nov 2016 18:03:55 +0000 Subject: [PATCH] Improve error message when source remote isn't found in sync #848 --- fs/operations.go | 3 +++ fs/sync.go | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/fs/operations.go b/fs/operations.go index 034ce21e4..1c7a0d156 100644 --- a/fs/operations.go +++ b/fs/operations.go @@ -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 } diff --git a/fs/sync.go b/fs/sync.go index 12d2cc154..8925414b2 100644 --- a/fs/sync.go +++ b/fs/sync.go @@ -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 }