mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 05:52:20 +08:00
Replace Critical{,f} with Error{,f}
Except when there is an explicit os.Exit(1) after the Critical line, then replace with Fatal{,f}. golang's log and logrus already call os.Exit(1) by default with Fatal. License: MIT Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
@ -462,10 +462,10 @@ func (dir *Directory) Rename(ctx context.Context, req *fuse.RenameRequest, newDi
|
||||
return err
|
||||
}
|
||||
case *File:
|
||||
log.Critical("Cannot move node into a file!")
|
||||
log.Error("Cannot move node into a file!")
|
||||
return fuse.EPERM
|
||||
default:
|
||||
log.Critical("Unknown node type for rename target dir!")
|
||||
log.Error("Unknown node type for rename target dir!")
|
||||
return errors.New("Unknown fs node type!")
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user