Skip to content

Include current version in profile/settings backup file name#3355

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/include-current-version-in-backup-filename
Draft

Include current version in profile/settings backup file name#3355
Copilot wants to merge 2 commits intomainfrom
copilot/include-current-version-in-backup-filename

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Backup filenames for settings and profiles now include the application version between the timestamp and original filename: <timestamp>_<version>_<original_filename>.

Changes

  • TimestampHelper.GetTimestampFilename — Added optional version parameter. When provided, dots are replaced with dashes and the segment is inserted between the timestamp and filename. Backward-compatible (omitting version preserves existing behavior).
  • SettingsManager.CreateDailyBackupIfNeeded — Passes AssemblyManager.Current.Version.ToString() to GetTimestampFilename.
  • ProfileManager.CreateDailyBackupIfNeeded — Same.

Example output

# Settings
20260201010630_2026-3-4-0_Settings.json

# Profiles
20260201010738_2026-3-4-0_test.encrypted
20260201010746_2026-3-4-0_Default.xml

Existing CleanupBackups logic (IsTimestampedFilename + Contains($"_{name}.")) continues to work correctly with the new format.

Related issue(s)

Copilot generated summary

Copilot summary

TimestampHelper.GetTimestampFilename gains an optional version string parameter. When supplied, the method replaces dots with dashes and inserts the version between the timestamp and the original filename (e.g., 20260201010630_2026-3-4-0_Settings.json). Both SettingsManager and ProfileManager are updated to pass AssemblyManager.Current.Version.ToString(), so all daily backups now embed the running application version. The IsNullOrWhiteSpace guard ensures no stray underscores appear if a blank version is ever passed.

To-Do

Contributing

By submitting this pull request, I confirm the following:

Original prompt

This section details on the original issue you should resolve

<issue_title>Include current version in profile/settings backup file name</issue_title>
<issue_description>Include the current version of NETworkManager in the profile/settings filename.

<timestamp>_<version>_<orginal_filename>

. in the version should be replaced with -

Settings:

20260201010630_Settings.json -> 20260201010630_2026-3-4-0_Settings.json

Profiles:

20260201010738_test.encrypted -> 20260201010738_2026-3-4-0_test.encrypted
20260201010746_Default.xml -> 20260201010746_2026-3-4-0_Default.xml

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
Copilot AI changed the title [WIP] Include current version in profile/settings backup file name Include current version in profile/settings backup file name Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include current version in profile/settings backup file name

2 participants