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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-12-05 23:10:16 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-05 23:12:13 +0400
commit3f82e829e5e014002913181e4738367d96af34b7 (patch)
tree8c964bf43545c1b1642165991427f40a3c990d36 /source/blender/windowmanager
parent07ceb99213166b678f0a0bac9c35e9897f22e827 (diff)
Correction to fix of T37688
rB68d39a262c90 didn't check correct file for doing versioning code. It shall check userprefs.blend not startup.blend.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index efbc0d78754..593912890ad 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -526,16 +526,16 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c
char prefstr[FILE_MAX];
int success = 0;
- /* Indicates whether file was really load from memory.
+ /* Indicates whether user prefereneces were really load from memory.
*
* This is used for versioning code, and for this we can not rely on from_memory
* passed via argument. This is because there might be configuration folder
- * exists but it might not have startup.blend and in this case we fallback to
+ * exists but it might not have userpref.blend and in this case we fallback to
* reading home file from memory.
*
* And in this case versioning code is to be run.
*/
- bool read_file_from_memory = false;
+ bool read_userdef_from_memory = true;
/* options exclude eachother */
BLI_assert((from_memory && custom_file) == 0);
@@ -589,7 +589,6 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c
}
if (success == 0) {
- read_file_from_memory = true;
success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL, true);
if (wmbase.first == NULL) wm_clear_default_size(C);
BLI_init_temporary_dir(U.tempdir);
@@ -604,7 +603,10 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c
/* check new prefs only after startup.blend was finished */
if (!from_memory && BLI_exists(prefstr)) {
int done = BKE_read_file_userdef(prefstr, NULL);
- if (done) printf("Read new prefs: %s\n", prefstr);
+ if (done) {
+ read_userdef_from_memory = false;
+ printf("Read new prefs: %s\n", prefstr);
+ }
}
/* prevent buggy files that had G_FILE_RELATIVE_REMAP written out by mistake. Screws up autosaves otherwise
@@ -612,7 +614,7 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c
G.fileflags &= ~G_FILE_RELATIVE_REMAP;
/* check userdef before open window, keymaps etc */
- wm_init_userdef(C, read_file_from_memory);
+ wm_init_userdef(C, read_userdef_from_memory);
/* match the read WM with current WM */
wm_window_match_do(C, &wmbase);