Fix error in the EPG database migration code.

This commit is contained in:
Adam Sutton 2012-08-01 15:45:59 +01:00
parent 7c35a73c1a
commit 2099f44126

View file

@ -145,10 +145,10 @@ void epg_init ( void )
/* Find the right file (and version) */
while (fd < 0 && ver > 0) {
fd = hts_settings_open_file(0, "epgdb.v%d", ver);
if (fd) break;
if (fd > 0) break;
ver--;
}
if (!fd)
if ( fd < 0 )
fd = hts_settings_open_file(0, "epgdb");
if ( fd < 0 ) {
tvhlog(LOG_DEBUG, "epgdb", "database does not exist");