mirror of
https://github.com/rclone/rclone
synced 2024-11-26 04:07:22 +01:00
Fix errors discovered with go vet nilness tool
This commit is contained in:
parent
2728948fb0
commit
0d475958c7
@ -708,9 +708,7 @@ func (f *Fs) List(dir string) (entries fs.DirEntries, err error) {
|
||||
id := info.GetID()
|
||||
f.dirCache.Put(remote, id)
|
||||
d := fs.NewDir(remote, time.Time(info.GetLastModifiedDateTime())).SetID(id)
|
||||
if folder != nil {
|
||||
d.SetItems(folder.ChildCount)
|
||||
}
|
||||
d.SetItems(folder.ChildCount)
|
||||
entries = append(entries, d)
|
||||
} else {
|
||||
o, err := f.newObjectWithInfo(remote, info)
|
||||
@ -824,9 +822,6 @@ func (f *Fs) purgeCheck(dir string, check bool) error {
|
||||
return err
|
||||
}
|
||||
f.dirCache.FlushDir(dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -287,9 +287,6 @@ func (f *Fs) purgeCheck(dir string, check bool) error {
|
||||
return err
|
||||
}
|
||||
f.dirCache.FlushDir(dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -188,8 +188,8 @@ func rcJobStatus(in Params) (out Params, err error) {
|
||||
defer job.mu.Unlock()
|
||||
out = make(Params)
|
||||
err = Reshape(&out, job)
|
||||
if job == nil {
|
||||
return nil, errors.New("Reshape failed in job status")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "reshape failed in job status")
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user