march: return errors when listing dirs

Partially fixes #3172
This commit is contained in:
Aleksandar Jankovic
2019-06-20 13:50:25 +02:00
committed by Nick Craig-Wood
parent 1be1fc073e
commit cc0800a72e
5 changed files with 60 additions and 12 deletions

View File

@@ -788,7 +788,7 @@ func CheckFn(ctx context.Context, fdst, fsrc fs.Fs, check checkFn, oneway bool)
Callback: c,
}
fs.Infof(fdst, "Waiting for checks to finish")
m.Run()
err := m.Run()
if c.dstFilesMissing > 0 {
fs.Logf(fdst, "%d files missing", c.dstFilesMissing)
@@ -807,7 +807,7 @@ func CheckFn(ctx context.Context, fdst, fsrc fs.Fs, check checkFn, oneway bool)
if c.differences > 0 {
return errors.Errorf("%d differences found", c.differences)
}
return nil
return err
}
// Check the files in fsrc and fdst according to Size and hash