Merged changes in the trunk up to revision 55357.
[blender.git] / source / blender / render / intern / source / render_result.c
index be1a3806e43ce1eeda14877fc9458abbdb3dee24..21e7b6986100826b7679b7c8a38ecfb725ee8124 100644 (file)
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
 #include "BLI_fileops.h"
 #include "BLI_listbase.h"
 #include "BLI_path_util.h"
 #include "BLI_rect.h"
 #include "BLI_string.h"
 #include "BLI_threads.h"
-#include "BLI_utildefines.h"
 
 #include "BKE_image.h"
 #include "BKE_global.h"
@@ -990,11 +990,9 @@ void render_result_exr_file_merge(RenderResult *rr, RenderResult *rrpart)
 /* path to temporary exr file */
 void render_result_exr_file_path(Scene *scene, const char *layname, int sample, char *filepath)
 {
-       char di[FILE_MAX], name[FILE_MAXFILE + MAX_ID_NAME + MAX_ID_NAME + 100], fi[FILE_MAXFILE];
-       
-       BLI_strncpy(di, G.main->name, FILE_MAX);
-       BLI_splitdirstring(di, fi);
+       char name[FILE_MAXFILE + MAX_ID_NAME + MAX_ID_NAME + 100], fi[FILE_MAXFILE];
        
+       BLI_split_file_part(G.main->name, fi, sizeof(fi));
        if (sample == 0)
                BLI_snprintf(name, sizeof(name), "%s_%s_%s.exr", fi, scene->id.name + 2, layname);
        else