diff options
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 5 |
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); |