mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 11:51:17 +00:00
fix: resolving path for shared item leaks parent info
when an item is shared, their path should stop at the closest directory that is shared. eg if file c is in shared dir b which is in private dir a, its public facing path should be b/c, not a/b/c. internally, the real path is still a/b/c.
This commit is contained in:
@@ -823,7 +823,7 @@ func (vfs *VirtualFS) RealPath(ctx context.Context, db bun.IDB, node *Node, scop
|
||||
} else if !ok {
|
||||
return nil, ErrAccessDenied
|
||||
}
|
||||
return buildNoteAbsolutePath(ctx, db, node)
|
||||
return buildNodeAbsolutePath(ctx, db, node, scope.RootNodeID)
|
||||
}
|
||||
|
||||
func (vfs *VirtualFS) PermanentlyDeleteFiles(ctx context.Context, db bun.IDB, nodes []*Node, scope *Scope) error {
|
||||
|
||||
Reference in New Issue
Block a user