Skip to content

Commit 43e6e66

Browse files
authored
Merge pull request #383 from Wieku/dev
Fix Beatmap parser not recognizing subfolders
2 parents 43841fb + b3dc333 commit 43e6e66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)