BLI_path api, minor changes to CWD handling

- BLI_current_working_dir's return value must be checked, since it may fail.
- BLI_current_working_dir now behaves like getcwd, where a too-small target will return failure.
- avoid buffer overrun with BLI_path_cwd, by taking a maxlen arg.
This commit is contained in:
2015-10-08 15:05:58 +11:00
parent e47177e301
commit a5e631171b
8 changed files with 23 additions and 34 deletions

View File

@@ -828,7 +828,7 @@ static void bpy_module_delay_init(PyObject *bpy_proxy)
char filename_abs[1024];
BLI_strncpy(filename_abs, filename_rel, sizeof(filename_abs));
BLI_path_cwd(filename_abs);
BLI_path_cwd(filename_abs, sizeof(filename_abs));
argv[0] = filename_abs;
argv[1] = NULL;