mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Merge branch 'master' into stable-slider-tick-anims
This commit is contained in:
commit
0b8d3cbce9
@ -702,6 +702,8 @@ namespace osu.Game.Tests.Database
|
||||
var firstImport = await importer.Import(new ImportTask(pathMissingOneBeatmap));
|
||||
Assert.That(firstImport, Is.Not.Null);
|
||||
|
||||
realm.Run(r => r.Refresh());
|
||||
|
||||
Assert.That(realm.Realm.All<BeatmapSetInfo>().Where(s => !s.DeletePending), Has.Count.EqualTo(1));
|
||||
Assert.That(realm.Realm.All<BeatmapSetInfo>().First(s => !s.DeletePending).Beatmaps, Has.Count.EqualTo(11));
|
||||
|
||||
@ -709,6 +711,8 @@ namespace osu.Game.Tests.Database
|
||||
var secondImport = await importer.Import(new ImportTask(pathOriginal));
|
||||
Assert.That(secondImport, Is.Not.Null);
|
||||
|
||||
realm.Run(r => r.Refresh());
|
||||
|
||||
Assert.That(realm.Realm.All<BeatmapInfo>(), Has.Count.EqualTo(23));
|
||||
Assert.That(realm.Realm.All<BeatmapSetInfo>(), Has.Count.EqualTo(2));
|
||||
|
||||
|
@ -96,12 +96,22 @@ namespace osu.Game.IO
|
||||
if (!destination.Exists)
|
||||
Directory.CreateDirectory(destination.FullName);
|
||||
|
||||
foreach (System.IO.FileInfo fi in source.GetFiles())
|
||||
foreach (System.IO.FileInfo fileInfo in source.GetFiles())
|
||||
{
|
||||
if (topLevelExcludes && IgnoreFiles.Contains(fi.Name))
|
||||
if (topLevelExcludes && IgnoreFiles.Contains(fileInfo.Name))
|
||||
continue;
|
||||
|
||||
AttemptOperation(() => fi.CopyTo(Path.Combine(destination.FullName, fi.Name), true));
|
||||
AttemptOperation(() =>
|
||||
{
|
||||
fileInfo.Refresh();
|
||||
|
||||
// A temporary file may have been deleted since the initial GetFiles operation.
|
||||
// We don't want the whole migration process to fail in such a case.
|
||||
if (!fileInfo.Exists)
|
||||
return;
|
||||
|
||||
fileInfo.CopyTo(Path.Combine(destination.FullName, fileInfo.Name), true);
|
||||
});
|
||||
}
|
||||
|
||||
foreach (DirectoryInfo dir in source.GetDirectories())
|
||||
|
Loading…
Reference in New Issue
Block a user