ignore CMakeLists.txt because it's not a directory
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8434 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 5972798e5b6629bc37a46c393af3d8ac494f939f Former-commit-id: f50cbf697f38bacc2a93c71656724efe9eee8149
This commit is contained in:
parent
2fceba177b
commit
a1ad780f48
2 changed files with 22 additions and 6 deletions
|
@ -96,6 +96,10 @@ GfCars::GfCars()
|
||||||
if (pFolder->name[0] == '.')
|
if (pFolder->name[0] == '.')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Ignore "CMakeLists.txt"
|
||||||
|
if (strcmp(pFolder->name, "CMakeLists.txt") == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Open the XML file of the car.
|
// Open the XML file of the car.
|
||||||
const char* pszCarId = pFolder->name;
|
const char* pszCarId = pFolder->name;
|
||||||
|
|
||||||
|
@ -104,7 +108,7 @@ GfCars::GfCars()
|
||||||
void* hparmCar = GfParmReadFile(ossCarFileName.str(), GFPARM_RMODE_STD);
|
void* hparmCar = GfParmReadFile(ossCarFileName.str(), GFPARM_RMODE_STD);
|
||||||
if (!hparmCar)
|
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(),
|
pszCarId, ossCarFileName.str().c_str(),
|
||||||
GfFileExists(ossCarFileName.str().c_str()) ? "readable" : "found");
|
GfFileExists(ossCarFileName.str().c_str()) ? "readable" : "found");
|
||||||
continue;
|
continue;
|
||||||
|
@ -120,7 +124,7 @@ GfCars::GfCars()
|
||||||
void* hparmCat = GfParmReadFile(ossCatFileName.str(), GFPARM_RMODE_STD);
|
void* hparmCat = GfParmReadFile(ossCatFileName.str(), GFPARM_RMODE_STD);
|
||||||
if (!hparmCat)
|
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(),
|
pszCarId, ossCatFileName.str().c_str(),
|
||||||
GfFileExists(ossCatFileName.str().c_str()) ? "readable" : "found");
|
GfFileExists(ossCatFileName.str().c_str()) ? "readable" : "found");
|
||||||
GfParmReleaseHandle(hparmCar);
|
GfParmReleaseHandle(hparmCar);
|
||||||
|
|
|
@ -102,6 +102,10 @@ GfTracks::GfTracks()
|
||||||
if (pszCatId[0] == '.')
|
if (pszCatId[0] == '.')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Ignore "CMakeLists.txt"
|
||||||
|
if (strcmp(pszCatId, "CMakeLists.txt") == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Get the list of sub-dirs in the "tracks" folder (the track categories).
|
// Get the list of sub-dirs in the "tracks" folder (the track categories).
|
||||||
std::string strDirName("tracks/");
|
std::string strDirName("tracks/");
|
||||||
strDirName += pszCatId;
|
strDirName += pszCatId;
|
||||||
|
@ -124,13 +128,21 @@ GfTracks::GfTracks()
|
||||||
// Determine and check the XML file of the track.
|
// Determine and check the XML file of the track.
|
||||||
const char* pszTrackId = pTrackFolder->name;
|
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;
|
std::ostringstream ossFileName;
|
||||||
ossFileName << "tracks/" << pszCatId << '/' << pszTrackId
|
ossFileName << "tracks/" << pszCatId << '/' << pszTrackId
|
||||||
<< '/' << pszTrackId << '.' << TRKEXT;
|
<< '/' << pszTrackId << '.' << TRKEXT;
|
||||||
const std::string strTrackFileName(ossFileName.str());
|
const std::string strTrackFileName(ossFileName.str());
|
||||||
if (!GfFileExists(strTrackFileName.c_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());
|
pszTrackId, strTrackFileName.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue