Fix: quit.blend is not saved as recovery file
This was broken in efb511a76d. The memfile-undo step always had
this flag set, but the non-memfile file-write did not.
This commit is contained in:
@@ -104,7 +104,9 @@ MemFileUndoData *BKE_memfile_undo_encode(Main *bmain, MemFileUndoData *mfu_prev)
|
||||
{
|
||||
MemFileUndoData *mfu = MEM_cnew<MemFileUndoData>(__func__);
|
||||
|
||||
/* Include recovery information since undo-data is written out as #BLENDER_QUIT_FILE. */
|
||||
/* This flag used to be set because the undo step was written as #BLENDER_QUIT_FILE. It's not
|
||||
* clear whether there are still good reasons to keep it. Undo can also be thought of as a kind
|
||||
* of recovery, so better keep it for now. */
|
||||
const int fileflags = G.fileflags | G_FILE_RECOVER_WRITE;
|
||||
|
||||
/* disk save version */
|
||||
|
||||
@@ -474,7 +474,8 @@ void WM_exit_ex(bContext *C, const bool do_python_exit, const bool do_user_exit_
|
||||
/* Save quit.blend. */
|
||||
Main *bmain = CTX_data_main(C);
|
||||
char filepath[FILE_MAX];
|
||||
const int fileflags = G.fileflags & ~G_FILE_COMPRESS;
|
||||
int fileflags = G.fileflags & ~G_FILE_COMPRESS;
|
||||
fileflags |= G_FILE_RECOVER_WRITE;
|
||||
|
||||
BLI_path_join(filepath, sizeof(filepath), BKE_tempdir_base(), BLENDER_QUIT_FILE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user