mirror of
https://github.com/osukey/osukey.git
synced 2025-05-09 23:57:18 +09: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;
|
error = OsuStorageError.None;
|
||||||
Storage lastStorage = UnderlyingStorage;
|
Storage lastStorage = UnderlyingStorage;
|
||||||
|
|
||||||
|
Logger.Log($"Attempting to use custom storage location {CustomStoragePath}");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Storage userStorage = host.GetStorage(CustomStoragePath);
|
Storage userStorage = host.GetStorage(CustomStoragePath);
|
||||||
@ -102,6 +104,7 @@ namespace osu.Game.IO
|
|||||||
error = OsuStorageError.AccessibleButEmpty;
|
error = OsuStorageError.AccessibleButEmpty;
|
||||||
|
|
||||||
ChangeTargetStorage(userStorage);
|
ChangeTargetStorage(userStorage);
|
||||||
|
Logger.Log($"Storage successfully changed to {CustomStoragePath}.");
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
@ -109,6 +112,9 @@ namespace osu.Game.IO
|
|||||||
ChangeTargetStorage(lastStorage);
|
ChangeTargetStorage(lastStorage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (error != OsuStorageError.None)
|
||||||
|
Logger.Log($"Custom storage location could not be used ({error}).");
|
||||||
|
|
||||||
return error == OsuStorageError.None;
|
return error == OsuStorageError.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user