mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 13:47:21 +08:00
Tidy up file deletion after import
This commit is contained in:
parent
6616721e37
commit
d93d9e6190
@ -87,11 +87,12 @@ namespace osu.Game.Beatmaps
|
|||||||
// TODO: Add a check to prevent files from storage to be deleted.
|
// TODO: Add a check to prevent files from storage to be deleted.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (File.Exists(path))
|
||||||
File.Delete(path);
|
File.Delete(path);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
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)
|
catch (Exception e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user