diff --git a/osu.Game/Beatmaps/IO/OszArchiveReader.cs b/osu.Game/Beatmaps/IO/OszArchiveReader.cs index eb9e740779..a22a5f4cce 100644 --- a/osu.Game/Beatmaps/IO/OszArchiveReader.cs +++ b/osu.Game/Beatmaps/IO/OszArchiveReader.cs @@ -15,7 +15,7 @@ namespace osu.Game.Beatmaps.IO AddReader((storage, path) => { using (var stream = storage.GetStream(path)) - return ZipFile.IsZipFile(stream, false); + return stream != null && ZipFile.IsZipFile(stream, false); }); OsuLegacyDecoder.Register(); } diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index efd5631077..43769f67b5 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -144,7 +144,11 @@ namespace osu.Game.Database public void Import(params string[] paths) { foreach (string p in paths) - Import(p); + { + //In case the file was imported twice and deleted after the first time + if (File.Exists(p)) + Import(p); + } } /// @@ -178,6 +182,8 @@ namespace osu.Game.Database if (existing != null) { + GetChildren(existing); + if (existing.DeletePending) { existing.DeletePending = false;