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>2021-11-01 05:15:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-11-01 05:15:10 +0300
commite2937ff24fc833d64f1aa94b07079ad168e300ce (patch)
tree3d509ed5b0259276baa8838663eed0b6059104d0 /source/blender/blenkernel/intern/appdir.c
parentc312c7196944b095fbd1b74c085a3af1e64409ce (diff)
parenta0633e2484f21c9f80842c10b46b3af98b54d25a (diff)
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender/blenkernel/intern/appdir.c')
-rw-r--r--source/blender/blenkernel/intern/appdir.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
index fb6656a4b1c..a43b708db52 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -170,6 +170,26 @@ const char *BKE_appdir_folder_default(void)
#endif /* WIN32 */
}
+const char *BKE_appdir_folder_root(void)
+{
+#ifndef WIN32
+ return "/";
+#else
+ static char root[4];
+ BLI_windows_get_default_root_dir(root);
+ return root;
+#endif
+}
+
+const char *BKE_appdir_folder_default_or_root(void)
+{
+ const char *path = BKE_appdir_folder_default();
+ if (path == NULL) {
+ path = BKE_appdir_folder_root();
+ }
+ return path;
+}
+
/**
* Get the user's home directory, i.e.
* - Unix: `$HOME`