Fix deletion and use single context for imports and deletions for now

This commit is contained in:
Dean Herbert
2017-10-18 18:27:17 +09:00
parent cf5290fead
commit 4841d4a937
2 changed files with 43 additions and 14 deletions

View File

@ -87,9 +87,9 @@ namespace osu.Game.IO
{
foreach (var f in files.GroupBy(f => f.ID))
{
var refetch = context.Find<FileInfo>(f.First().ID);
var refetch = context.FileInfo.Find(f.Key);
refetch.ReferenceCount -= f.Count();
context.Update(refetch);
context.FileInfo.Update(refetch);
}
context.SaveChanges();