fix(files): cleanups
This commit is contained in:
parent
c864c2bcb5
commit
2b55d5c159
2 changed files with 5 additions and 4 deletions
|
@ -109,7 +109,8 @@ func (h *FileHandlers) canAccess(userName, role, op, path string) bool {
|
|||
}
|
||||
// TODO: improve performance
|
||||
for i := 1; i <= len(parts); i++ {
|
||||
_, ok := h.deps.FileInfos().GetSharing(strings.Join(parts[0:i], "/"))
|
||||
prefix := strings.Join(parts[0:i], "/")
|
||||
_, ok := h.deps.FileInfos().GetSharing(prefix)
|
||||
if ok {
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue