From 8fe37cea5100e74c10e6dcee786d881ddbabf17e Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 5 Jul 2004 13:40:37 +0000 Subject: [PATCH] Remove the need to append a trailing / to the texture-path string. --- simgear/scene/model/model.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx index f23f59ec..e2059c9f 100644 --- a/simgear/scene/model/model.cxx +++ b/simgear/scene/model/model.cxx @@ -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"); -- 2.39.5