Fix lint issues reported by staticcheck
Used staticcheck 2022.1.2 (v0.3.2) See: staticcheck.io
This commit is contained in:
parent
74bd7f3381
commit
ec117593f1
66 changed files with 130 additions and 185 deletions
|
@ -1252,10 +1252,7 @@ func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options .
|
|||
func (f *Fs) mkParentDir(ctx context.Context, dirPath string) error {
|
||||
// defer log.Trace(dirPath, "")("")
|
||||
// chop off trailing / if it exists
|
||||
if strings.HasSuffix(dirPath, "/") {
|
||||
dirPath = dirPath[:len(dirPath)-1]
|
||||
}
|
||||
parent := path.Dir(dirPath)
|
||||
parent := path.Dir(strings.TrimSuffix(dirPath, "/"))
|
||||
if parent == "." {
|
||||
parent = ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue