diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-07 05:02:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-07 05:10:36 +0300 |
commit | d14e76806921f9a4d686ea731364242ededb735d (patch) | |
tree | 0d43db74bc544798eca32f1a46deb2705d87a1a3 /source/blender/editors/space_buttons/buttons_ops.c | |
parent | d54757e389862a081deb3d2064e95fdaddb1880a (diff) |
Cleanup: BLI_path.h function renaming
Use BLI_path_ prefix, more consistent names:
BLI_parent_dir -> BLI_path_parent_dir
BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists
BLI_ensure_filename -> BLI_path_filename_ensure
BLI_first_slash -> BLI_path_slash_find
BLI_last_slash -> BLI_path_slash_rfind
BLI_add_slash -> BLI_path_slash_ensure
BLI_del_slash -> BLI_path_slash_rstrip
BLI_path_native_slash -> BLI_path_slash_native
Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`.
BLI_cleanup_path -> BLI_path_normalize
BLI_cleanup_dir -> BLI_path_normalize_dir
BLI_cleanup_unc -> BLI_path_normalize_unc
BLI_cleanup_unc16 -> BLI_path_normalize_unc16
Clarify naming for extracting, creating numbered paths:
BLI_stringenc -> BLI_path_sequence_encode
BLI_stringdec -> BLI_path_sequence_decode
Part of T74506 proposal.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index e2affa7bc36..9af623d8065 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -110,7 +110,7 @@ static int file_browse_exec(bContext *C, wmOperator *op) if (BLI_is_dir(path)) { /* do this first so '//' isnt converted to '//\' on windows */ - BLI_add_slash(path); + BLI_path_slash_ensure(path); if (is_relative) { BLI_strncpy(path, str, FILE_MAX); BLI_path_rel(path, BKE_main_blendfile_path(bmain)); @@ -122,7 +122,7 @@ static int file_browse_exec(bContext *C, wmOperator *op) } } else { - char *const lslash = (char *)BLI_last_slash(str); + char *const lslash = (char *)BLI_path_slash_rfind(str); if (lslash) { lslash[1] = '\0'; } @@ -187,7 +187,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) PointerRNA props_ptr; if (event->alt) { - char *lslash = (char *)BLI_last_slash(str); + char *lslash = (char *)BLI_path_slash_rfind(str); if (lslash) { *lslash = '\0'; } |