Skip to content

Commit

Permalink
fix: friendly tip for initial logging in [skip ci] (#3406)
Browse files Browse the repository at this point in the history
* refactor: friendly tip for initial logging in

* fix CodeFactor issue

more info pls refer to: https://segmentfault.com/a/1190000043031147
  • Loading branch information
tonghs authored Feb 18, 2023
1 parent fcaf485 commit ee77c3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/op/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ func GetStorageAndActualPath(rawPath string) (storage driver.Driver, actualPath
rawPath = utils.FixAndCleanPath(rawPath)
storage = GetBalancedStorage(rawPath)
if storage == nil {
if rawPath == "/" {
err = errors.New("please add a storage first.")
return
}
err = errors.Errorf("can't find storage with rawPath: %s", rawPath)
return
}
Expand Down

0 comments on commit ee77c3b

Please sign in to comment.