mirror of
https://github.com/osukey/osukey.git
synced 2025-05-22 14:07:38 +09:00
invert and early return
This commit is contained in:
parent
8e8458ab8f
commit
7a3315dcf8
@ -60,13 +60,13 @@ namespace osu.Game.Tournament.IO
|
||||
|
||||
private void moveFileIfExists(string file, DirectoryInfo destination)
|
||||
{
|
||||
if (storage.Exists(file))
|
||||
{
|
||||
Logger.Log($"Migrating {file} to default tournament storage.");
|
||||
var fileInfo = new System.IO.FileInfo(storage.GetFullPath(file));
|
||||
AttemptOperation(() => fileInfo.CopyTo(Path.Combine(destination.FullName, fileInfo.Name), true));
|
||||
fileInfo.Delete();
|
||||
}
|
||||
if (!storage.Exists(file))
|
||||
return;
|
||||
|
||||
Logger.Log($"Migrating {file} to default tournament storage.");
|
||||
var fileInfo = new System.IO.FileInfo(storage.GetFullPath(file));
|
||||
AttemptOperation(() => fileInfo.CopyTo(Path.Combine(destination.FullName, fileInfo.Name), true));
|
||||
fileInfo.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user