Skip to content
Snippets Groups Projects
Commit 630a8871 authored by shammash's avatar shammash
Browse files

workaround for stat on root dir


Signed-off-by: default avatarshammash <shammash@autistici.org>
parent 79ef9622
Branches
No related tags found
1 merge request!1Minor fixes on test instance
......@@ -48,8 +48,12 @@ func (afs *ByArtistFilesystem) Stat(path string) (Attr, error) {
if len(p) == 3 {
return afs.getSong(p[0], p[1], p[2])
} else if len(p) < 3 {
name := "/"
if len(p) > 0 {
name = p[len(p)-1]
}
attr := Attr{
Name: p[len(p)-1],
Name: name,
IsDir: true,
}
return attr, nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment