Skip to content

Commit

Permalink
chore: add debug log for setting songs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
cyperdark committed Sep 15, 2024
1 parent 459de90 commit c091d7f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/tosu/src/objects/instanceManager/osuInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,30 @@ export class OsuInstance {
}

if (!allTimesData.GameFolder) {
wLogger.warn('Setting game folder', {
path: this.path,
MemorySongsFolder: allTimesData.MemorySongsFolder
});
allTimesData.setGameFolder(this.path);

// condition when user have different BeatmapDirectory in osu! config
if (fs.existsSync(allTimesData.MemorySongsFolder)) {
wLogger.warn(
'Setting SONGS folder',
'using custom path',
this.path,
allTimesData.MemorySongsFolder
);
allTimesData.setSongsFolder(
allTimesData.MemorySongsFolder
);
} else {
wLogger.warn(
'Setting SONGS folder',
'using combine path',
this.path,
allTimesData.MemorySongsFolder
);
allTimesData.setSongsFolder(
path.join(this.path, allTimesData.MemorySongsFolder)
);
Expand Down

0 comments on commit c091d7f

Please sign in to comment.