Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/filelist.cc
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| const char *relbase = job_params->cur_relbase; | const char *relbase = job_params->cur_relbase; | ||||
| /* Early exit, nothing to join. */ | /* Early exit, nothing to join. */ | ||||
| if (!relbase[0]) { | if (!relbase[0]) { | ||||
| return BLI_strdup(filename); | return BLI_strdup(filename); | ||||
| } | } | ||||
| BLI_assert(relbase[strlen(relbase) - 1] == SEP); | BLI_assert(ELEM(relbase[strlen(relbase) - 1], SEP, ALTSEP)); | ||||
| BLI_assert(BLI_path_is_rel(relbase)); | BLI_assert(BLI_path_is_rel(relbase)); | ||||
| char relpath[FILE_MAX_LIBEXTRA]; | char relpath[FILE_MAX_LIBEXTRA]; | ||||
| /* Using #BLI_path_join works but isn't needed as `rel_subdir` has a trailing slash. */ | /* Using #BLI_path_join works but isn't needed as `rel_subdir` has a trailing slash. */ | ||||
| BLI_string_join(relpath, | BLI_string_join(relpath, | ||||
| sizeof(relpath), | sizeof(relpath), | ||||
| /* + 2 to remove "//" relative path prefix. */ | /* + 2 to remove "//" relative path prefix. */ | ||||
| relbase + 2, | relbase + 2, | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||