- updated nuget packages

- fixed issues where SQLite database files didn't get unlocked after saving
- fixed quirks with missing e_sqlite3.dll when running unit tests with Resharper
This commit is contained in:
Horst Beham
2022-11-29 18:21:52 +01:00
parent a39d8f7d18
commit 6f3df7044e
88 changed files with 949 additions and 780 deletions

View File

@@ -449,26 +449,36 @@ left outer join {dbSchema.DvbServiceTable} digs on digs.ServiceId=s.Pid
if (tvOutputFile != FileName)
File.Copy(FileName, tvOutputFile, true);
using var conn = new SqliteConnection("Data Source=" + tvOutputFile);
conn.Open();
using var trans = conn.BeginTransaction();
using var cmd = conn.CreateCommand();
try
{
using var conn = new SqliteConnection("Data Source=" + tvOutputFile);
conn.Open();
using var trans = conn.BeginTransaction();
using var cmd = conn.CreateCommand();
try
{
#if !LOCK_LCN_LISTS
ResetLcn(cmd);
#endif
UpdateServices(cmd);
UpdatePhysicalChannelLists(cmd);
UpdateUserFavoriteLists(cmd);
UpdateServices(cmd);
UpdatePhysicalChannelLists(cmd);
UpdateUserFavoriteLists(cmd);
trans.Commit();
FileName = tvOutputFile;
trans.Commit();
FileName = tvOutputFile;
}
catch
{
trans.Rollback();
throw;
}
}
catch
finally
{
trans.Rollback();
throw;
// force closing the file and releasing the locks
SqliteConnection.ClearAllPools();
GC.Collect();
GC.WaitForPendingFinalizers();
}
}