From c3037e38919d399bde9e7b6b923fae42b9c09f2a Mon Sep 17 00:00:00 2001 From: ehofman Date: Sat, 11 Jun 2005 08:13:30 +0000 Subject: [PATCH] Fix by Durk Talsma to fix the Airport AI directory preread code. --- src/Airports/simple.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Airports/simple.cxx b/src/Airports/simple.cxx index a516036c8..1964ce667 100644 --- a/src/Airports/simple.cxx +++ b/src/Airports/simple.cxx @@ -1192,7 +1192,7 @@ void FGAirportList::add( const string id, const double longitude, rwyPrefPath.append( "/Airports/AI/" ); rwyPrefPath.append(id); rwyPrefPath.append("rwyuse.xml"); - if (ai_dirs.find(parkpath.str()) != ai_dirs.end() + if (ai_dirs.find(id.c_str()) != ai_dirs.end() && parkpath.exists()) { try { @@ -1202,7 +1202,7 @@ void FGAirportList::add( const string id, const double longitude, //cerr << "unable to read " << parkpath.str() << endl; } } - if (ai_dirs.find(rwyPrefPath.str()) != ai_dirs.end() + if (ai_dirs.find(id.c_str()) != ai_dirs.end() && rwyPrefPath.exists()) { try { -- 2.39.5