]> git.mxchange.org Git - flightgear.git/commitdiff
Patch from Frederic Bouvier:
authordavid <david>
Sat, 16 Nov 2002 22:01:15 +0000 (22:01 +0000)
committerdavid <david>
Sat, 16 Nov 2002 22:01:15 +0000 (22:01 +0000)
I have discovered recently that plib has ulIsAbsolutePathName
in ul.lib so you can try this patch.

src/Model/model.cxx

index fd1ea0095558d402a4c27d7e0e9f2c744e6bed0c..ef18cf36e9931a9388aefb8bfdabad4eae7de7b9 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <plib/sg.h>
 #include <plib/ssg.h>
+#include <plib/ul.h>
 
 #include <simgear/compiler.h>
 #include <simgear/debug/logstream.hxx>
@@ -253,7 +254,7 @@ fgLoad3DModel (const string &path)
                                 // Load the 3D aircraft object itself
   SGPath xmlpath;
   SGPath modelpath = path;
-  if ( path[ 0 ] == '/' || path[ 0 ] == '\\' || ( isalpha( path[ 0 ] ) && path[ 1 ] == ':' ) ) {
+  if ( ulIsAbsolutePathName( path.c_str() ) ) {
     xmlpath = modelpath;
   }
   else {