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-12-16 08:17:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-16 08:27:35 +0300
commit15c36170092d26b7d6106924270b6e590627fcb6 (patch)
tree5d0a7e27b35a7da9d13da4f782c1a3cc17fc3fd9 /source/blender/windowmanager/intern
parent4e98d974b596cdb7b04872b9c8fb43fc284696e9 (diff)
Cleanup: simplify file saving logic
Revert part of the fix from 073669dd8588a3b80dfffee98b4f239b4baee8c8 that initialized the file-path on first save as it's no longer needed. Also remove relbase argument to BLI_path_normalize as the destination file paths shouldn't use relative locations.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 0867ed5303c..7ac9395e16c 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -1813,24 +1813,16 @@ static bool wm_file_write(bContext *C,
ED_editors_flush_edits(bmain);
- /* First time saving. */
- /* XXX(ton): temp solution to solve bug, real fix coming. */
- const bool relbase_valid = (bmain->filepath[0] != '\0');
- if ((relbase_valid == false) && (use_save_as_copy == false)) {
- STRNCPY(bmain->filepath, filepath);
- }
-
/* XXX(ton): temp solution to solve bug, real fix coming. */
bmain->recovered = 0;
- if (BLO_write_file(CTX_data_main(C),
+ if (BLO_write_file(bmain,
filepath,
fileflags,
&(const struct BlendFileWriteParams){
.remap_mode = remap_mode,
.use_save_versions = true,
.use_save_as_copy = use_save_as_copy,
- .use_save_first_time = !relbase_valid,
.thumb = thumb,
},
reports)) {