forked from TrueCloudLab/frostfs-node
[#1177] cli: Fix resource name parsing
* If `root` name is given explicitly, then it should be translated to `//` but not `/root/`. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
3fc8e0e08c
commit
b9d6c9d10c
2 changed files with 11 additions and 2 deletions
|
@ -279,7 +279,7 @@ func parseResource(lexeme string, isObj bool) (string, error) {
|
|||
if isObj {
|
||||
if lexeme == "*" {
|
||||
return nativeschema.ResourceFormatAllObjects, nil
|
||||
} else if lexeme == "/*" {
|
||||
} else if lexeme == "/*" || lexeme == "root/*" {
|
||||
return nativeschema.ResourceFormatRootObjects, nil
|
||||
} else if strings.HasPrefix(lexeme, "/") {
|
||||
lexeme = lexeme[1:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue