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-03-15 05:30:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-15 06:48:17 +0300
commit88b24bc6bbbf35bde00c55834330b56708f25897 (patch)
treee236a0d29251c5f83d92c67ee3e577c4dde1516c /source/blender/blenloader
parentd3b4ff6eaa1cb155adf4b2aad4775746bc3ca6df (diff)
Writefile: only include recovery info in auto-save & quit.blend
Previously all blend files included the path they were saved, causing files distributed publicly to include users local paths. This also included developers home directories for startup & userprefs defaults & app-templates bundled with Blender. Now recovery information is only written for auto-save & quit.blend since this is the only time they're intended to be used.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/writefile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 6fbd4b77487..4ac49d5aebb 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -870,7 +870,10 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
fg.fileflags = (fileflags & ~G_FILE_FLAG_ALL_RUNTIME);
fg.globalf = G.f;
- BLI_strncpy(fg.filename, mainvar->name, sizeof(fg.filename));
+ /* Write information needed for recovery. */
+ if (fileflags & G_FILE_RECOVER_WRITE) {
+ BLI_strncpy(fg.filename, mainvar->name, sizeof(fg.filename));
+ }
sprintf(subvstr, "%4d", BLENDER_FILE_SUBVERSION);
memcpy(fg.subvstr, subvstr, 4);