Skip to content

Commit

Permalink
Merge pull request #383 from Wieku/dev
Browse files Browse the repository at this point in the history
Fix Beatmap parser not recognizing subfolders
  • Loading branch information
Wieku authored Nov 4, 2024
2 parents 43841fb + b3dc333 commit 43e6e66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/beatmap/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ func ParseBeatMap(beatMap *BeatMap) error {

func ParseBeatMapFile(file *os.File) *BeatMap {
beatMap := NewBeatMap()
beatMap.Dir = filepath.Base(filepath.Dir(file.Name()))
beatMap.Dir, _ = filepath.Rel(settings.General.GetSongsDir(), filepath.Dir(file.Name()))
beatMap.Dir = filepath.ToSlash(beatMap.Dir)

f, _ := file.Stat()
beatMap.File = f.Name()

Expand Down

0 comments on commit 43e6e66

Please sign in to comment.