Fix repeated error messages after pkg/errors removal

This commit is contained in:
Nick Craig-Wood 2021-11-15 12:17:30 +00:00
parent 7735b5c694
commit ba6730720d
2 changed files with 2 additions and 2 deletions

View File

@ -489,7 +489,7 @@ func NewFs(ctx context.Context, name, rootPath string, m configmap.Mapper) (fs.F
f.opt.TempWritePath = filepath.ToSlash(f.opt.TempWritePath)
f.tempFs, err = cache.Get(ctx, f.opt.TempWritePath)
if err != nil {
return nil, fmt.Errorf("failed to create temp fs: %v: %w", err, err)
return nil, fmt.Errorf("failed to create temp fs: %w", err)
}
fs.Infof(name, "Upload Temp Rest Time: %v", f.opt.TempWaitTime)
fs.Infof(name, "Upload Temp FS: %v", f.opt.TempWritePath)

View File

@ -1006,7 +1006,7 @@ func hashSum(ctx context.Context, ht hash.Type, base64Encoded bool, downloadFlag
return "", fmt.Errorf("hash unsupported: %w", err)
}
if err != nil {
return "", fmt.Errorf("failed to get hash %v from backend: %v: %w", ht, err, err)
return "", fmt.Errorf("failed to get hash %v from backend: %w", ht, err)
}
}