diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-12 03:39:24 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-12 04:02:25 +0300 |
commit | cf9c0a4b506e85a4158ec68413c60e8af1de4a0a (patch) | |
tree | 1557ceba108b5ef7bba237d25a3eb7cfc23781a4 /source/blender/blenlib/intern | |
parent | caf6225a3d01b3a5d471dc62bb4508477fc4e7df (diff) |
Tests: add tests for leading (relative) slashes for BLI_path_join
Also note that leading slashes are kept in the doc-string.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 1e95aa3b7b0..c053c3907db 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1505,8 +1505,8 @@ size_t BLI_path_join(char *__restrict dst, const size_t dst_len, const char *pat return ofs; } - /* remove trailing slashes, unless there are _only_ trailing slashes - * (allow "//" as the first argument). */ + /* Remove trailing slashes, unless there are *only* trailing slashes + * (allow `//` or `//some_path` as the first argument). */ bool has_trailing_slash = false; if (ofs != 0) { size_t len = ofs; |