Skip to content

fix: update FileVersionInfos when calling CopyTo, MoveTo and Replace on a IFileInfo - #1455

Merged
vbreuss merged 1 commit into
TestableIO:mainfrom
FrancescoLuzzi:fix/maintain_version_infos
Apr 9, 2026
Merged

fix: update FileVersionInfos when calling CopyTo, MoveTo and Replace on a IFileInfo#1455
vbreuss merged 1 commit into
TestableIO:mainfrom
FrancescoLuzzi:fix/maintain_version_infos

Conversation

@FrancescoLuzzi

Copy link
Copy Markdown
Contributor

This PR fixes an issue where copying, moving or replacing a file would lose all the FileVersionInfo informations when using a MockFileSystem

Changes:

  • When creating a new MockFileData also copy the FileVersionInfo
  • Added tests to validate the fix

Open questions:

  • should FileVersionInfo be cloned or is the current fix enough?

@FrancescoLuzzi
FrancescoLuzziforce-pushed the fix/maintain_version_infos branch from 602af4b to eda19ebCompareApril 9, 2026 13:49

@vbreussvbreuss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @FrancescoLuzzi, Looks good to me. I don't think it is necessary to clone the FileVersionInfo.

@vbreuss
vbreuss merged commit 16aa745 into TestableIO:mainApr 9, 2026
10 checks passed
@github-actionsgithub-actionsBot added the state: released Issues that are released label Apr 9, 2026
@github-actions

Copy link
Copy Markdown

This is addressed in release v22.1.1.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: releasedIssues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@FrancescoLuzzi@vbreuss