1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 14:22:55 +08:00

Tidy up file deletion after import

This commit is contained in:
Dean Herbert 2017-07-28 15:08:56 +09:00
parent 6616721e37
commit d93d9e6190

View File

@ -87,11 +87,12 @@ namespace osu.Game.Beatmaps
// TODO: Add a check to prevent files from storage to be deleted.
try
{
File.Delete(path);
if (File.Exists(path))
File.Delete(path);
}
catch (Exception e)
{
Logger.Error(e, $@"Could not delete file at {path}");
Logger.Error(e, $@"Could not delete original file after import ({Path.GetFileName(path)})");
}
}
catch (Exception e)