Milkitic/Osu-Player

error while loading 714239

Kyrios0 opened this issue · 5 comments

  • Issue
    There's an extra space after the folder while loading, which can cause error.

  • Sample & Reproducible
    714239: Yes
    153887: Maybe

Tested:
image
image

I think it's a limit of .NET API. The DirectoryInfo Itself auto trimmed the path for both Name property and FullName property. While scanning beatmaps, I mostly used DirectoryInfo class:
https://github.com/Milkitic/Osu-Player/blob/master/OsuPlayer.Common/Scanning/OsuFileScanner.cs#L124
So fixing this line will resolve the problem I think.

Let me explain this in detail:
After I pressing the 'Play' buttom, OsuPlayer starts to load 714239. Here's the snapshot of folder where found a extra space.
图片

But actually, open a powershell in this folder, I found there should be no space at the end of folder.
图片

So the error is: When the player is trying to load resources from folder, the StreamRead function will raise System.IO.DirectoryNotFoundException because folder + ' \\' + resource is not exist.

Here's Folder name in osu!db
图片

OK it's a bug of osu db. Tried to optimize it

Closed