Skip to content

Config: Ensure conversion to filesystem::path uses utf-8#1231

Merged
tt2468 merged 1 commit into
obsproject:masterfrom
derrod:fix-migration-path
Jun 11, 2024
Merged

Config: Ensure conversion to filesystem::path uses utf-8#1231
tt2468 merged 1 commit into
obsproject:masterfrom
derrod:fix-migration-path

Conversation

@derrod

@derrod derrod commented Jun 11, 2024

Copy link
Copy Markdown
Member

Description

Use u8path to construct the std::filesystem::path to ensure the string is correctly treated as UTF-8.

Motivation and Context

Fixes crash on startup if OBS is installed on non-English systems.

How Has This Been Tested?

Tested on a Windows VM with a user named くそ, while I could not reproduce the crash, I could reproduce the plugin not loading due to the migration failing. With this patch it worked and loaded up normally.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the Contributing Guidelines.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • My code is not on master or a release/* branch.
  • The code has been tested.
  • I have included updates to all appropriate documentation.

@RytoEX
RytoEX requested a review from tt2468 June 11, 2024 18:47

@RytoEX RytoEX 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.

Looks correct at a glance. @tt2468 ?

@tt2468
tt2468 merged commit 9e48274 into obsproject:master Jun 11, 2024
@derrod
derrod deleted the fix-migration-path branch June 11, 2024 20:50
@derrod
derrod restored the fix-migration-path branch June 11, 2024 20:50
@derrod
derrod deleted the fix-migration-path branch June 11, 2024 20:50
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.

3 participants