mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 03:22:53 +08:00
Merge pull request #29412 from peppy/file-io-test-failure
This commit is contained in:
commit
6840f4bca4
@ -47,6 +47,7 @@ using osu.Game.Screens.Select.Carousel;
|
|||||||
using osu.Game.Screens.Select.Leaderboards;
|
using osu.Game.Screens.Select.Leaderboards;
|
||||||
using osu.Game.Screens.Select.Options;
|
using osu.Game.Screens.Select.Options;
|
||||||
using osu.Game.Tests.Beatmaps.IO;
|
using osu.Game.Tests.Beatmaps.IO;
|
||||||
|
using osu.Game.Utils;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
using SharpCompress;
|
using SharpCompress;
|
||||||
@ -240,11 +241,14 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
|
|
||||||
AddStep("change beatmap files", () =>
|
AddStep("change beatmap files", () =>
|
||||||
{
|
{
|
||||||
foreach (var file in Game.Beatmap.Value.BeatmapSetInfo.Files.Where(f => Path.GetExtension(f.Filename) == ".osu"))
|
FileUtils.AttemptOperation(() =>
|
||||||
{
|
{
|
||||||
using (var stream = Game.Storage.GetStream(Path.Combine("files", file.File.GetStoragePath()), FileAccess.ReadWrite))
|
foreach (var file in Game.Beatmap.Value.BeatmapSetInfo.Files.Where(f => Path.GetExtension(f.Filename) == ".osu"))
|
||||||
stream.WriteByte(0);
|
{
|
||||||
}
|
using (var stream = Game.Storage.GetStream(Path.Combine("files", file.File.GetStoragePath()), FileAccess.ReadWrite))
|
||||||
|
stream.WriteByte(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("invalidate cache", () =>
|
AddStep("invalidate cache", () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user