Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo de Greef <eeshlo@yahoo.com>2004-09-21 03:59:09 +0400
committerAlfredo de Greef <eeshlo@yahoo.com>2004-09-21 03:59:09 +0400
commit7d65af235e08b5e785a6dc2ca76f0ae8727b39bf (patch)
tree8d5618def2b4cd6e432055bf56b1983f06ff6abc /source/blender/yafray/intern/export_File.cpp
parent273c8e08041111714e47dbb0d50604553fd5f854 (diff)
test commit
Bugfix for anim crash with xml export and no export dir set. Alternate relative path using blender function, but wouldn't be surprised if it still is a problem in some cases for some (windows) users.
Diffstat (limited to 'source/blender/yafray/intern/export_File.cpp')
-rwxr-xr-xsource/blender/yafray/intern/export_File.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp
index 22f8f1f042a..5584ac47bd3 100755
--- a/source/blender/yafray/intern/export_File.cpp
+++ b/source/blender/yafray/intern/export_File.cpp
@@ -294,18 +294,18 @@ void yafrayFileRender_t::displayImage()
}
+#ifdef WIN32
+#define MAXPATHLEN MAX_PATH
+#else
+#include <sys/param.h>
+#endif
static void adjustPath(string &path)
{
// if relative, expand to full path
- if ((path[0]=='/') && (path[1]=='/')) {
- string basepath = G.sce;
- // fwd slash valid for win32 as well
- int ls = basepath.find_last_of("/");
-#ifdef WIN32
- if (ls==-1) ls = basepath.find_last_of("\\");
-#endif
- path = basepath.substr(0, ls) + path.substr(1, path.length());
- }
+ char cpath[MAXPATHLEN];
+ strcpy(cpath, path.c_str());
+ BLI_convertstringcode(cpath, G.sce, 0);
+ path = cpath;
#ifdef WIN32
// add drive char if not there
addDrive(path);