mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 13:26:11 +08:00
crypt: add missing error check spotted by linter
This commit is contained in:
parent
4c6d2c5410
commit
186bb85c44
|
@ -566,7 +566,10 @@ func (f *Fs) MkdirMetadata(ctx context.Context, dir string, metadata fs.Metadata
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var entries = make(fs.DirEntries, 0, 1)
|
var entries = make(fs.DirEntries, 0, 1)
|
||||||
f.addDir(ctx, &entries, newDir)
|
err = f.addDir(ctx, &entries, newDir)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
newDir, ok := entries[0].(fs.Directory)
|
newDir, ok := entries[0].(fs.Directory)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("internal error: expecting %T to be fs.Directory", entries[0])
|
return nil, fmt.Errorf("internal error: expecting %T to be fs.Directory", entries[0])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user