33 files changed, 7184 insertions, 7887 deletions
diff --git a/tvapi/libtv/tvdb/CTvDatabase.cpp b/tvapi/libtv/tvdb/CTvDatabase.cpp index 1a19976..5f9fd40 100644 --- a/tvapi/libtv/tvdb/CTvDatabase.cpp +++ b/tvapi/libtv/tvdb/CTvDatabase.cpp @@ -67,7 +67,7 @@ int CTvDatabase::UnInitTvDb() int CTvDatabase::InitTvDb(const char *path) { if (path != NULL) { - if (Tv_Utils_IsFileExist(path) == 0 && config_get_int("TV", "tv_db_created", 0) == 1) { //exist or created + if (Tv_Utils_IsFileExist(path) && config_get_int("TV", "tv_db_created", 0) == 1) { //exist or created LOGD("tv db file(%s) exist and created, open it", path); if (openDb(path) < 0 ) { LOGD("db(%s) open fail", path); @@ -80,7 +80,7 @@ int CTvDatabase::InitTvDb(const char *path) LOGD("scan region table is NULL, so import freq XML again\n"); } } else { - if (Tv_Utils_IsFileExist(path) == 0) { // if just exist, create flag not set, delete it + if (Tv_Utils_IsFileExist(path)) { // if just exist, create flag not set, delete it LOGD("tv db file (%s) exist, but delete it", path); if (unlink(path) != 0) { LOGD("delete tv db file(%s) err=%s", path, strerror(errno)); |