[server][core] Fox targetNameParentByPathWithRoot

This commit is contained in:
Abhishek Shroff
2025-05-10 23:43:43 +05:30
parent 69c6b17f4c
commit 9f5ab47ebc

View File

@@ -94,7 +94,8 @@ func (f filesystem) targetNameParentByPathWithRoot(path string, src Resource) (s
f = f.withPathRoot(pgtype.UUID{Bytes: src.id, Valid: true})
}
i := strings.LastIndex(strings.TrimRight(path, "/"), "/")
path = strings.TrimRight(path, "/")
i := strings.LastIndex(path, "/")
parentPath := ""
if i > 0 {
parentPath = path[i:]