fixed id parent on root on root
This commit is contained in:
parent
979ebee677
commit
47befe6db1
@ -69,9 +69,15 @@ func (i ID) Parent() *ID {
|
|||||||
Key: strings.Join(parts[:len(parts)-2], "/") + "/",
|
Key: strings.Join(parts[:len(parts)-2], "/") + "/",
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
dir := filepath.Dir(i.Key)
|
||||||
|
|
||||||
|
if dir != "/" {
|
||||||
|
dir += "/"
|
||||||
|
}
|
||||||
|
|
||||||
parent = &ID{
|
parent = &ID{
|
||||||
Bucket: i.Bucket,
|
Bucket: i.Bucket,
|
||||||
Key: filepath.Dir(i.Key) + "/",
|
Key: dir,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user