From 7d65af235e08b5e785a6dc2ca76f0ae8727b39bf Mon Sep 17 00:00:00 2001 From: Alfredo de Greef Date: Mon, 20 Sep 2004 23:59:09 +0000 Subject: 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. --- source/blender/yafray/intern/export_File.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/yafray/intern/export_File.cpp') 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 +#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); -- cgit v1.2.3