mirror of
https://github.com/ppy/osu
synced 2025-01-11 08:39:31 +00:00
Add log output for custom storage usage
Sometimes I am not sure where my osu! is reading files from. This should help somewhat. ```csharp /Users/dean/Projects/osu/osu.Desktop/bin/Debug/net6.0/osu! [runtime] 2022-07-13 07:22:03 [verbose]: Starting legacy IPC provider... [runtime] 2022-07-13 07:22:03 [verbose]: Attempting to use custom storage location /Users/dean/Games/osu-lazer-2 [runtime] 2022-07-13 07:22:03 [verbose]: Storage successfully changed to /Users/dean/Games/osu-lazer-2. [runtime] 2022-07-13 07:22:05 [verbose]: GL Initialized ```
This commit is contained in:
parent
83703e28e6
commit
27ef7fc78e
@ -94,6 +94,8 @@ namespace osu.Game.IO
|
||||
error = OsuStorageError.None;
|
||||
Storage lastStorage = UnderlyingStorage;
|
||||
|
||||
Logger.Log($"Attempting to use custom storage location {CustomStoragePath}");
|
||||
|
||||
try
|
||||
{
|
||||
Storage userStorage = host.GetStorage(CustomStoragePath);
|
||||
@ -102,6 +104,7 @@ namespace osu.Game.IO
|
||||
error = OsuStorageError.AccessibleButEmpty;
|
||||
|
||||
ChangeTargetStorage(userStorage);
|
||||
Logger.Log($"Storage successfully changed to {CustomStoragePath}.");
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -109,6 +112,9 @@ namespace osu.Game.IO
|
||||
ChangeTargetStorage(lastStorage);
|
||||
}
|
||||
|
||||
if (error != OsuStorageError.None)
|
||||
Logger.Log($"Custom storage location could not be used ({error}).");
|
||||
|
||||
return error == OsuStorageError.None;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user