[Bf-blender-cvs] [c90fbbf75a2] master: WM: update comment for wm_autosave_location auto-save fallback
Campbell Barton
noreply at git.blender.org
Sat Sep 10 08:56:09 CEST 2022
Commit: c90fbbf75a28bd2044b780e70db5f10b88869ac0
Author: Campbell Barton
Date: Sat Sep 10 16:03:40 2022 +1000
Branches: master
https://developer.blender.org/rBc90fbbf75a28bd2044b780e70db5f10b88869ac0
WM: update comment for wm_autosave_location auto-save fallback
===================================================================
M source/blender/windowmanager/intern/wm_files.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 6d2248ba354..0e43ed5509a 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -1917,12 +1917,11 @@ static void wm_autosave_location(char filepath[FILE_MAX])
}
const char *tempdir_base = BKE_tempdir_base();
+ /* NOTE(@campbellbarton): It's strange that this is only used on WIN32.
+ * From reading commits it seems accessing the temporary directory used to be less reliable.
+ * If this is still the case on WIN32 - other features such as copy-paste will also fail.
+ * We could support #BLENDER_USER_AUTOSAVE on all platforms or remove it entirely. */
#ifdef WIN32
- /* XXX Need to investigate how to handle default location of `/tmp/`
- * This is a relative directory on Windows, and it may be found. Example:
- * Blender installed on `D:\` drive, `D:\` drive has `D:\tmp\` Now, `BLI_exists()`
- * will find `/tmp/` exists, but #BLI_windows_get_default_root_dir will expand this to `C:\`.
- * If there is no `C:\tmp` autosave fails. */
if (!BLI_exists(tempdir_base)) {
const char *savedir = BKE_appdir_folder_id_create(BLENDER_USER_AUTOSAVE, NULL);
if (savedir) {
More information about the Bf-blender-cvs
mailing list