diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-05 01:40:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-05 01:43:57 +0300 |
commit | 659f81f1cbc3189c3a00cf290f4bade7614c4e91 (patch) | |
tree | 163173eeab0b5361bc6bb04025dbe5446139f7a3 /source | |
parent | ffa71526266930584e2d7a93f4c9f8539fafdd2c (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/appdir.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |