fix no more working sec with old api
[enigma2.git] / lib / dvb / epgcache.cpp
index 1428cc7cfac0b584e25e307342f4a3fee8189eb6..6c98011b70570770506f3ca1747f8860e1d9d706 100644 (file)
@@ -861,10 +861,10 @@ void eEPGCache::thread()
 
 void eEPGCache::load()
 {
-       singleLock s(cache_lock);
        FILE *f = fopen("/hdd/epg.dat", "r");
        if (f)
        {
+               unlink("/hdd/epg.dat");
                int size=0;
                int cnt=0;
 #if 0
@@ -898,6 +898,7 @@ void eEPGCache::load()
                        fread( text1, 13, 1, f);
                        if ( !strncmp( text1, "ENIGMA_EPG_V7", 13) )
                        {
+                               singleLock s(cache_lock);
                                fread( &size, sizeof(int), 1, f);
                                while(size--)
                                {