Commit 7227973e2fc493f82e1477ba82e3e8aa956b23ef

Don't expect an 'Aircraft' sub-directory within each aircraft-dir.
  
7272 return SGPath(); // not an Aircraft path
7373 }
7474
75 // test against the aircraft-dir property
7576 const char* aircraftDir = fgGetString("/sim/aircraft-dir");
7677 string_list aircraftDirPieces(sgPathBranchSplit(aircraftDir));
7778 if (aircraftDirPieces.empty() || (aircraftDirPieces.back() != pieces[1])) {
8484 r.append(pieces[i]);
8585 }
8686
87 return r.exists() ? r : SGPath();
87 if (r.exists()) {
88 SG_LOG(SG_IO, SG_INFO, "found path:" << aResource << " via /sim/aircraft-dir: " << r.str());
89 return r;
90 }
91
92 // try each aircaft dir in turn
93 std::string res(aResource, 9); // resource path with 'Aircraft/' removed
94 const string_list& dirs(globals->get_aircraft_paths());
95 string_list::const_iterator it = dirs.begin();
96 for (; it != dirs.end(); ++it) {
97 SGPath p(*it, res);
98 if (p.exists()) {
99 SG_LOG(SG_IO, SG_INFO, "found path:" << aResource << " in aircraft dir: " << r.str());
100 return p;
101 }
102 } // of aircraft path iteration
103
104 return SGPath(); // not found
88105 }
89106};
90107
293293
294294 unsigned int index = fg_aircraft_dirs.size();
295295 fg_aircraft_dirs.push_back(path);
296
297 simgear::ResourceManager::instance()->addBasePath(path,
298 simgear::ResourceManager::PRIORITY_NORMAL);
299296
300297// make aircraft dirs available to Nasal
301298 SGPropertyNode* sim = fgGetNode("/sim", true);