Merge branch 'master' into blender2.8
[blender.git] / source / blender / windowmanager / intern / wm_files.c
index 784cdcc97dda4a63c3f7181d9769dac74fb55252..3de6824c23df669e6e2475b58235c6f4b6d53adf 100644 (file)
@@ -746,13 +746,13 @@ int wm_homefile_read(
 
        if ((app_template != NULL) && (app_template[0] != '\0')) {
                BKE_appdir_app_template_id_search(app_template, app_template_system, sizeof(app_template_system));
-               BLI_path_join(app_template_config, sizeof(app_template_config), cfgdir, app_template, NULL);
 
                /* Insert template name into startup file. */
 
                /* note that the path is being set even when 'use_factory_settings == true'
                 * this is done so we can load a templates factory-settings */
                if (!use_factory_settings) {
+                       BLI_path_join(app_template_config, sizeof(app_template_config), cfgdir, app_template, NULL);
                        BLI_path_join(filepath_startup, sizeof(filepath_startup), app_template_config, BLENDER_STARTUP_FILE, NULL);
                        if (BLI_access(filepath_startup, R_OK) != 0) {
                                filepath_startup[0] = '\0';