diff --git a/api/fsapi/by_artist.go b/api/fsapi/by_artist.go index 7519d1e0c1fbc5b7ffacfa569eb41dc54ad554b7..85472666ed3bfec49156a2ad166f8cbcd216ef9e 100644 --- a/api/fsapi/by_artist.go +++ b/api/fsapi/by_artist.go @@ -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