kopia lustrzana https://github.com/dl2alf/AirScout
StationDB - mark DB update done only if no error occured
Especially if you would cancel an update, it would be marked as complete nevertheles, leaving the database update incomplete.stationdb_debug
rodzic
2b29a5f2f4
commit
a397486143
|
@ -404,12 +404,17 @@ namespace ScoutBase.Stations
|
|||
{
|
||||
// database and/or update changed --> do full check
|
||||
if (!ReadLocationsFromURL(Properties.Settings.Default.Stations_UpdateURL + "locations.zip", Path.Combine(TmpDirectory, "locations.zip"), Path.Combine(TmpDirectory, "locations.json")))
|
||||
{
|
||||
errors++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// save status & timestamps
|
||||
SaveDatabaseTimeStamp();
|
||||
SaveDatabaseStatus();
|
||||
SaveLocationUpdateTimeStamp();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// dabase and update not changed --> nothing to do
|
||||
|
@ -425,12 +430,17 @@ namespace ScoutBase.Stations
|
|||
if (HasDatabaseChanged() || HasQRVUpdateChanged())
|
||||
{
|
||||
if (!ReadQRVFromURL(Properties.Settings.Default.Stations_UpdateURL + "qrv.zip", Path.Combine(TmpDirectory, "qrv.zip"), Path.Combine(TmpDirectory, "qrv.json")))
|
||||
{
|
||||
errors++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// save status & timestamps
|
||||
SaveDatabaseTimeStamp();
|
||||
SaveDatabaseStatus();
|
||||
SaveQRVUpdateTimeStamp();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// dabase and update not changed --> nothing to do
|
||||
|
|
Ładowanie…
Reference in New Issue