Skip to content

fix: SG-43710: saveSession(asACopy=true) overwrites the working session filename - #1303

Merged
eloisebrosseau merged 1 commit into
AcademySoftwareFoundation:mainfrom
markreidvfx:nas_contrib_save_as_copy_fix_v1
Jul 31, 2026
Merged

fix: SG-43710: saveSession(asACopy=true) overwrites the working session filename#1303
eloisebrosseau merged 1 commit into
AcademySoftwareFoundation:mainfrom
markreidvfx:nas_contrib_save_as_copy_fix_v1

Conversation

@markreidvfx

Copy link
Copy Markdown
Contributor

Linked issues

N/A

Summarize your change.

Fix saveSession(asACopy=true) so it writes a copy of the session without changing the current session's filename.

Describe the reason for the change.

Two bugs caused saveSession(asACopy=true) to rename the working session to the copy path. First, RvSession::write() did not forward writeAsCopy as the saveAs option, so Session::write() defaulted to calling setFileName(). Second, RvSession::write() unconditionally called setFileName() after the write, so even with the correct option the rename would still happen. The fix passes saveAs=writeAsCopy in the WriteRequest and removes the unconditional setFileName().

Describe what you have tested and on which operating system.

Tested on Rocky Linux 9.

Add a list of changes, and note any that might need special attention during the review.

  • RvSession.cpp: Pass saveAs=writeAsCopy in the write request; remove unconditional setFileName() after write.

If possible, provide screenshots.

N/A

When the Mu saveSession command is called with asACopy=true, the intent
is to write a copy without changing the current session. Two bugs
prevented this:

1. RvSession::write() did not forward writeAsCopy as the "saveAs"
   option to Session::write(). Without it, Session::write() defaults
   saveAs to false and calls setFileName(), updating the session to
   point at the copy.

2. RvSession::write() unconditionally called setFileName() after
   Session::write() returned, so even if saveAs were set correctly
   the rename would still happen.

Fix: pass saveAs=writeAsCopy in the WriteRequest and remove the
unconditional setFileName() from RvSession::write().

Signed-off-by: Mark Reid <markreid@netflixanimation.com>
@bernie-laberge bernie-laberge changed the title fix: saveSession(asACopy=true) overwrites the working session filename fix: SG-43710: saveSession(asACopy=true) overwrites the working session filename Jun 15, 2026
@bernie-laberge bernie-laberge added PR: Acknowledged New PR has been acknowledge by the TSC community Contribution from the Open RV Community labels Jun 15, 2026
@eloisebrosseau eloisebrosseau added PR: In Progress PR is being reviewed by code reviewer. PR: In Testing This PR is being built and tested by QA. and removed PR: Acknowledged New PR has been acknowledge by the TSC PR: In Progress PR is being reviewed by code reviewer. labels Jul 7, 2026

@bernie-laberge bernie-laberge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @markreidvfx !

@eloisebrosseau eloisebrosseau removed the PR: In Testing This PR is being built and tested by QA. label Jul 31, 2026
@eloisebrosseau
eloisebrosseau merged commit 6a3af6e into AcademySoftwareFoundation:main Jul 31, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Contribution from the Open RV Community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants