]> git.mxchange.org Git - simgear.git/commitdiff
Remove the need to append a trailing / to the texture-path string.
authorehofman <ehofman>
Mon, 5 Jul 2004 13:40:37 +0000 (13:40 +0000)
committerehofman <ehofman>
Mon, 5 Jul 2004 13:40:37 +0000 (13:40 +0000)
simgear/scene/model/model.cxx

index f23f59ec42a3984ca89bdee1da3e84bf4e9d9434..e2059c9feb63bb0b17abafb1d85b1140b6bb2b62 100644 (file)
@@ -249,7 +249,10 @@ sgLoad3DModel( const string &fg_root, const string &path,
                                 // Assume that textures are in
                                 // the same location as the XML file.
   if (model == 0) {
-    ssgTexturePath((char *)texturepath.dir().c_str());
+    if (texturepath.extension() != "")
+          texturepath = texturepath.dir();
+
+    ssgTexturePath((char *)texturepath.c_str());
     model = (ssgBranch *)ssgLoad((char *)modelpath.c_str());
     if (model == 0)
       throw sg_exception("Failed to load 3D model");