Skip to content

Commit b3dc333

Browse files
committed
Fix Beatmap parser not recognizing subfolders
1 parent 43841fb commit b3dc333

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/beatmap/parser.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ func ParseBeatMap(beatMap *BeatMap) error {
240240

241241
func ParseBeatMapFile(file *os.File) *BeatMap {
242242
beatMap := NewBeatMap()
243-
beatMap.Dir = filepath.Base(filepath.Dir(file.Name()))
243+
beatMap.Dir, _ = filepath.Rel(settings.General.GetSongsDir(), filepath.Dir(file.Name()))
244+
beatMap.Dir = filepath.ToSlash(beatMap.Dir)
245+
244246
f, _ := file.Stat()
245247
beatMap.File = f.Name()
246248

0 commit comments

Comments
 (0)