[Bf-blender-cvs] [659f81f1cbc] master: Correct last commit (where_is_temp refactor)

Campbell Barton noreply at git.blender.org
Mon Oct 5 00:44:23 CEST 2020


Commit: 659f81f1cbc3189c3a00cf290f4bade7614c4e91
Author: Campbell Barton
Date:   Mon Oct 5 09:40:01 2020 +1100
Branches: master
https://developer.blender.org/rB659f81f1cbc3189c3a00cf290f4bade7614c4e91

Correct last commit (where_is_temp refactor)

Changes didn't account the case when mkdtemp failed.
Previously the copying the string wasn't needed in this case.

===================================================================

M	source/blender/blenkernel/intern/appdir.c

===================================================================

diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
index 018bb47403a..feed56f733d 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -1087,7 +1087,8 @@ static void tempdir_session_create(char *tempdir_session,
     CLOG_WARN(&LOG,
               "Could not generate a temp file name for '%s', falling back to '%s'",
               tmp_name,
-              tempdir_session);
+              tempdir);
+    BLI_strncpy(tempdir_session, tmp_name, tempdir_session_len);
   }
 
   MEM_freeN(tmp_name);



More information about the Bf-blender-cvs mailing list