]> Sergey Matveev's repositories - btrtrc.git/blobdiff - fs/torrentfs.go
Add File priorities
[btrtrc.git] / fs / torrentfs.go
index 5fdc95e8cc4abc0d20489c0275e8c6068245de20..52b5ff5989e330bde799481b3ab9e0755b1b78f4 100644 (file)
@@ -106,7 +106,7 @@ func (dn dirNode) Lookup(_ context.Context, name string) (fusefs.Node, error) {
        fullPath := dn.path + "/" + name
        for _, f := range dn.t.Files() {
                if f.DisplayPath() == fullPath {
-                       file = &f
+                       file = f
                }
                if isSubPath(fullPath, f.DisplayPath()) {
                        dir = true
@@ -143,7 +143,7 @@ func (rn rootNode) Lookup(ctx context.Context, name string) (_node fusefs.Node,
                        t:        t,
                }
                if !info.IsDir() {
-                       _node = fileNode{__node, &t.Files()[0]}
+                       _node = fileNode{__node, t.Files()[0]}
                } else {
                        _node = dirNode{__node}
                }