projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0238a3d
)
torrentfs: fix a bug where ENOENT is returned when the node for an entry in the root...
author
Radoslav Georgiev <rgeorgiev583@gmail.com>
Tue, 16 Apr 2019 20:23:03 +0000 (23:23 +0300)
committer
Matt Joiner <anacrolix@gmail.com>
Tue, 23 Apr 2019 11:02:55 +0000 (21:02 +1000)
fs/torrentfs.go
patch
|
blob
|
history
diff --git
a/fs/torrentfs.go
b/fs/torrentfs.go
index 8e3e6898c3a0e7085f35e9268a46ac925d8d0af7..1bcc85fa8e84edf7bb6066aa183990020bbe4fa1 100644
(file)
--- a/
fs/torrentfs.go
+++ b/
fs/torrentfs.go
@@
-102,7
+102,12
@@
func (dn dirNode) ReadDirAll(ctx context.Context) (des []fuse.Dirent, err error)
func (dn dirNode) Lookup(_ context.Context, name string) (fusefs.Node, error) {
dir := false
var file *torrent.File
- fullPath := dn.path + "/" + name
+ var fullPath string
+ if dn.path != "" {
+ fullPath = dn.path + "/" + name
+ } else {
+ fullPath = name
+ }
for _, f := range dn.t.Files() {
if f.DisplayPath() == fullPath {
file = f