Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-10-25 13:36:47 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-10-25 13:37:35 +0300
commit892e5f4a9f8a3f4e67a6ff00e4195b628decc127 (patch)
tree737e29b1991e8a0919f1cc0a4b5ae98d6130b9f2 /source/blender/blenkernel/intern/asset_catalog_path.cc
parent550cbec5c4dcf785d382950e2651a423f55b2f6a (diff)
Asset Catalogs: be more accepting of backslashes as separators
Asset Catalog Paths should only contain forward slashes as separators, but now the UI is more resilient to people using blackslashes instead. Manifest Task: T90553
Diffstat (limited to 'source/blender/blenkernel/intern/asset_catalog_path.cc')
-rw-r--r--source/blender/blenkernel/intern/asset_catalog_path.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/asset_catalog_path.cc b/source/blender/blenkernel/intern/asset_catalog_path.cc
index fec2b76e7a1..20cac76b40b 100644
--- a/source/blender/blenkernel/intern/asset_catalog_path.cc
+++ b/source/blender/blenkernel/intern/asset_catalog_path.cc
@@ -197,6 +197,8 @@ void AssetCatalogPath::iterate_components(ComponentIteratorFn callback) const
for (const char *path_component = this->path_.data(); path_component && path_component[0];
/* Jump to one after the next slash if there is any. */
path_component = next_slash_ptr ? next_slash_ptr + 1 : nullptr) {
+ /* Note that this also treats backslashes as component separators, which
+ * helps in cleaning up backslash-separated paths. */
next_slash_ptr = BLI_path_slash_find(path_component);
const bool is_last_component = next_slash_ptr == nullptr;