Fix #112423: Recover Autosave breaks library paths. #115048

Merged
Bastien Montagne merged 4 commits from mont29/blender:tmp-fix-112423wq into main 2024-01-24 10:49:33 +01:00

Trying to 'recover' a normal (non-auto-saved) blendfile would break any
relative paths.

Caused by 88b24bc6bb, it looks like this commit did not take into
account readfile side of the code?

Trying to 'recover' a normal (non-auto-saved) blendfile would break any relative paths. Caused by 88b24bc6bbbf35b, it looks like this commit did not take into account readfile side of the code?
Bastien Montagne force-pushed tmp-fix-112423wq from 2878a97b5e to 3b690d4003 2023-11-17 15:53:04 +01:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne requested review from Brecht Van Lommel 2023-11-17 15:53:49 +01:00
Bastien Montagne requested review from Campbell Barton 2023-11-17 15:53:49 +01:00
Brecht Van Lommel requested changes 2023-11-21 19:37:56 +01:00
@ -3100,7 +3100,6 @@ static BHead *read_global(BlendFileData *bfd, FileData *fd, BHead *bhead)
bfd->fileflags = fg->fileflags;
bfd->globalf = fg->globalf;
STRNCPY(bfd->filepath, fg->filepath);

By removing this, the bfd->filepath[0] == 0 condition below will always be true.

From what I can tell we can remove the entire code inside that conditional, as we are no longer relying on bfd->filepath to be set at all for non-recovery cases. And for the recovery cases, the <= 250 files have no recovery filepath so it also makes no sense to set it.

By removing this, the `bfd->filepath[0] == 0` condition below will always be true. From what I can tell we can remove the entire code inside that conditional, as we are no longer relying on `bfd->filepath` to be set at all for non-recovery cases. And for the recovery cases, the <= 250 files have no recovery filepath so it also makes no sense to set it.
Author
Owner

Indeed, nice catch!

Indeed, nice catch!
mont29 marked this conversation as resolved
Bastien Montagne added 2 commits 2023-11-22 12:00:15 +01:00
Brecht Van Lommel approved these changes 2023-11-22 17:39:09 +01:00
Campbell Barton approved these changes 2023-12-06 03:29:22 +01:00
Pratik Borhade changed title from Fix #122423: Recover Autosave breaks library paths. to Fix #112423: Recover Autosave breaks library paths. 2023-12-06 04:32:55 +01:00
Bastien Montagne added 1 commit 2024-01-23 18:34:01 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
2482b03ba2
Merge branch 'main' into tmp-fix-112423wq
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne merged commit 3c62917213 into main 2024-01-24 10:49:33 +01:00
Bastien Montagne deleted branch tmp-fix-112423wq 2024-01-24 10:49:35 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#115048
No description provided.