This commit is contained in:
Jacques Lucke 2023-01-24 19:29:42 +01:00
parent d2fc31f178
commit 8f70825923
3 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@
extern "C" {
#endif
bool ED_asset_bundle_contains_path(const char *path);
bool ED_asset_bundled_contains_path(const char *path);
#ifdef __cplusplus
}

View File

@ -4,7 +4,7 @@
* \ingroup asset_system
*/
#include "BLI_string.h"
#include "BLI_path_util.h"
#include "BKE_appdir.h"
@ -23,9 +23,9 @@ StringRefNull bundled_assets_directory_path()
} // namespace blender::asset_system
bool ED_asset_bundle_contains_path(const char *path)
bool ED_asset_bundled_contains_path(const char *path)
{
const blender::StringRefNull bundled_path =
blender::asset_system::bundled_assets_directory_path();
return BLI_str_startswith(path, bundled_path.c_str());
return BLI_path_contains(bundled_path.c_str(), path);
}

View File

@ -130,7 +130,7 @@ static void draw_tile_background(const rcti *draw_rect, int colorid, int shade)
static eFileAssetImportType get_asset_import_type(const SpaceFile *sfile, const char *blend_path)
{
if (ED_asset_bundle_contains_path(blend_path)) {
if (ED_asset_bundled_contains_path(blend_path)) {
return FILE_ASSET_IMPORT_APPEND_REUSE;
}
const FileAssetSelectParams *asset_params = ED_fileselect_get_asset_params(sfile);