diff --git a/src/libs/tgfdata/cars.cpp b/src/libs/tgfdata/cars.cpp index 4ac6ee00b..12e516ca5 100644 --- a/src/libs/tgfdata/cars.cpp +++ b/src/libs/tgfdata/cars.cpp @@ -95,6 +95,10 @@ GfCars::GfCars() // Ignore "." and ".." folders. if (pFolder->name[0] == '.') continue; + + // Ignore "CMakeLists.txt" + if (strcmp(pFolder->name, "CMakeLists.txt") == 0) + continue; // Open the XML file of the car. const char* pszCarId = pFolder->name; @@ -104,7 +108,7 @@ GfCars::GfCars() void* hparmCar = GfParmReadFile(ossCarFileName.str(), GFPARM_RMODE_STD); if (!hparmCar) { - GfLogInfo("Ignoring car %s (file %s not %s)\n", + GfLogError("Ignoring car %s (file %s not %s)\n", pszCarId, ossCarFileName.str().c_str(), GfFileExists(ossCarFileName.str().c_str()) ? "readable" : "found"); continue; @@ -120,7 +124,7 @@ GfCars::GfCars() void* hparmCat = GfParmReadFile(ossCatFileName.str(), GFPARM_RMODE_STD); if (!hparmCat) { - GfLogInfo("Ignoring car %s (category file %s not %s)\n", + GfLogError("Ignoring car %s (category file %s not %s)\n", pszCarId, ossCatFileName.str().c_str(), GfFileExists(ossCatFileName.str().c_str()) ? "readable" : "found"); GfParmReleaseHandle(hparmCar); diff --git a/src/libs/tgfdata/tracks.cpp b/src/libs/tgfdata/tracks.cpp index 73cd738aa..75b629c7c 100644 --- a/src/libs/tgfdata/tracks.cpp +++ b/src/libs/tgfdata/tracks.cpp @@ -101,7 +101,11 @@ GfTracks::GfTracks() const char* pszCatId = pCatFolder->name; if (pszCatId[0] == '.') continue; - + + // Ignore "CMakeLists.txt" + if (strcmp(pszCatId, "CMakeLists.txt") == 0) + continue; + // Get the list of sub-dirs in the "tracks" folder (the track categories). std::string strDirName("tracks/"); strDirName += pszCatId; @@ -120,17 +124,25 @@ GfTracks::GfTracks() do { //GfLogDebug("GfTracks::GfTracks() : Examining track %s\n", pTrackFolder->name); - + // Determine and check the XML file of the track. const char* pszTrackId = pTrackFolder->name; - + + // Ignore "." and ".." folders. + if (pszTrackId[0] == '.') + continue; + + // Ignore "CMakeLists.txt" + if (strcmp(pszTrackId, "CMakeLists.txt") == 0) + continue; + std::ostringstream ossFileName; ossFileName << "tracks/" << pszCatId << '/' << pszTrackId << '/' << pszTrackId << '.' << TRKEXT; const std::string strTrackFileName(ossFileName.str()); if (!GfFileExists(strTrackFileName.c_str())) { - GfLogInfo("Ignoring track %s : %s not found\n", + GfLogError("Ignoring track %s : %s not found\n", pszTrackId, strTrackFileName.c_str()); continue; }