Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loopback fs could no be used inside a tree #503

Open
goloveychuk opened this issue Mar 11, 2024 · 1 comment
Open

Loopback fs could no be used inside a tree #503

goloveychuk opened this issue Mar 11, 2024 · 1 comment

Comments

@goloveychuk
Copy link

goloveychuk commented Mar 11, 2024

Maybe I'm doing smth incorrect, but when I try to render loopback somewhere inside a tree, path is calculated incorrectly, it takes bridge root to calc relative path, but it should take LoopBack root.

path := n.Path(n.Root())

fix could be to add

func (n *LoopbackNode) Root() *Inode {
	if n.RootData.RootNode != nil {
		return n.RootData.RootNode
	}
	return n.Inode.Root()
}

and replace all inode.Root() usages with loopback.Root(), e.g.

if inode.Root() != inode && inode.StableAttr().Ino != n.RootData.idFromStat(&st).Ino {

@goloveychuk
Copy link
Author

fast "fix"
e0b7bf3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant