X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f45ad930a1f328f880def7e4caa5f48e76c3392f..80c9ad7d8d0e709d8bed740481b46ff23654fcaa:/lib/dvb/db.cpp diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index ccaecd4f..05474071 100644 --- a/lib/dvb/db.cpp +++ b/lib/dvb/db.cpp @@ -615,24 +615,16 @@ void eDVBDB::loadBouquet(const char *path) p+=path; eDebug("loading bouquet... %s", p.c_str()); FILE *fp=fopen(p.c_str(), "rt"); - int entries=0; if (!fp) { - struct stat s; - if ( !stat(path, &s) ) - { - rename(path, p.c_str() ); - loadBouquet(path); - return; - } - eDebug("failed to open."); - if ( strstr(path, "bouquets.tv") ) + eDebug("can't open %s: %m", p.c_str()); + if (!strcmp(path, "bouquets.tv")) { eDebug("recreate bouquets.tv"); bouquet.m_bouquet_name="Bouquets (TV)"; bouquet.flushChanges(); } - else if ( strstr(path, "bouquets.radio") ) + else if (!strcmp(path, "bouquets.radio")) { eDebug("recreate bouquets.radio"); bouquet.m_bouquet_name="Bouquets (Radio)"; @@ -640,6 +632,7 @@ void eDVBDB::loadBouquet(const char *path) } return; } + int entries=0; char line[256]; bool read_descr=false; eServiceReference *e = NULL;