forked from bartvdbraak/blender
Fix T86544: better cleanup of path given as command line argument.
When using non-default system separator in filename path, code would end up with an absolute path mixing regular and alternative separator, confusing the rest of the path manipulations later on. So this commit add proper replacements of alternative separators, and path normalization.
This commit is contained in:
parent
509e0c5b76
commit
fbd889ec28
@ -1959,7 +1959,9 @@ static int arg_handle_load_file(int UNUSED(argc), const char **argv, void *data)
|
||||
}
|
||||
|
||||
BLI_strncpy(filename, argv[0], sizeof(filename));
|
||||
BLI_path_slash_native(filename);
|
||||
BLI_path_abs_from_cwd(filename, sizeof(filename));
|
||||
BLI_path_normalize(NULL, filename);
|
||||
|
||||
/* load the file */
|
||||
BKE_reports_init(&reports, RPT_PRINT);
|
||||
|
Loading…
Reference in New Issue
Block a user