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:
authorCampbell Barton <ideasman42@gmail.com>2020-10-03 18:19:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-04 01:33:14 +0300
commit6f3a9031f7b93e7c687edde646beed9f02d920d4 (patch)
tree3ba8709e633b85668e756341167cbb82f9897397 /source/blender/blenkernel/BKE_appdir.h
parentd8c3ad6f986a8996f99d81a2cad735a8bfc9b3e1 (diff)
Cleanup: BKE_appdir left paths set even when not found
Internally appdir functions would test if a path exists, returning false if it doesn't, leaving the string set instead of clearing it. This is error prone as invalid paths could be used accidentally. Since BKE_appdir_folder_id_user_notest & BKE_appdir_folder_id_version depend on this, add a 'check_is_dir' argument so the path can be used even when the directory can't be found.
Diffstat (limited to 'source/blender/blenkernel/BKE_appdir.h')
-rw-r--r--source/blender/blenkernel/BKE_appdir.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_appdir.h b/source/blender/blenkernel/BKE_appdir.h
index 09d74c16bc8..8e63631b9d5 100644
--- a/source/blender/blenkernel/BKE_appdir.h
+++ b/source/blender/blenkernel/BKE_appdir.h
@@ -28,14 +28,16 @@ struct ListBase;
/* note on naming: typical _get() suffix is omitted here,
* since its the main purpose of the API. */
const char *BKE_appdir_folder_default(void);
-const char *BKE_appdir_folder_id_ex(const int folder_id,
- const char *subfolder,
- char *path,
- size_t path_len);
+bool BKE_appdir_folder_id_ex(const int folder_id,
+ const char *subfolder,
+ char *path,
+ size_t path_len);
const char *BKE_appdir_folder_id(const int folder_id, const char *subfolder);
const char *BKE_appdir_folder_id_create(const int folder_id, const char *subfolder);
const char *BKE_appdir_folder_id_user_notest(const int folder_id, const char *subfolder);
-const char *BKE_appdir_folder_id_version(const int folder_id, const int ver, const bool do_check);
+const char *BKE_appdir_folder_id_version(const int folder_id,
+ const int ver,
+ const bool check_is_dir);
bool BKE_appdir_app_is_portable_install(void);
bool BKE_appdir_app_template_any(void);