remove find backup files

This commit is contained in:
Anton Suhorukov 2022-12-28 10:22:46 +03:00
parent 7af24dc759
commit 45ab3bcc5f

View File

@ -248,10 +248,6 @@ public class MigrationCreator
private List<IGrouping<string, BackupFileInfo>> GetFilesGroup(Guid id)
{
var files = GetFilesToProcess(id).ToList();
var backupsContext = _dbFactory.CreateDbContext<BackupsContext>();
var exclude = backupsContext.Backups.AsQueryable().Where(b => b.TenantId == _tenant && b.StorageType == 0 && b.StoragePath != null).ToList();
files = files.Where(f => !exclude.Any(e => f.Path.Replace('\\', '/').Contains($"/file_{e.StoragePath}/"))).ToList();
return files.GroupBy(file => file.Module).ToList();
}