1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-01 03:12:56 +08:00

Avoid crashes on attempting to import the same path twice in quick succession

This commit is contained in:
Dean Herbert 2017-07-18 16:11:23 +09:00
parent 5761eb30a0
commit f00140f0a4

View File

@ -144,7 +144,11 @@ namespace osu.Game.Database
public void Import(params string[] paths) public void Import(params string[] paths)
{ {
foreach (string p in 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);
}
} }
/// <summary> /// <summary>