Skip to content

Fix handling of filepaths in migration - #552

Merged
RytoEX merged 1 commit into
obsproject:masterfrom
Warchamp7:u8-file-path-fixes
Oct 16, 2026
Merged

RytoEX merged 1 commit into
obsproject:masterfrom
Warchamp7:u8-file-path-fixes

Conversation

@Warchamp7

@Warchamp7 Warchamp7 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Description

Treat paths from libobs as explicitly utf8 when passing them to std::filesystem.

Motivation and Context

Passing a std::string to std::filesystem will use the system codepage.

On Windows, this means it will interpret const char* as ANSI but the paths returned by libobs are utf8.

If the path only contains ASCII characters, then everything is fine. If the path contains non ASCII characters, then it leads to errors.

How Has This Been Tested?

I removed the folders for my migrated browser settings and then launched OBS again to confirm data was still migrated.

I also tested with a separate user on my machine with a username written in Japanese, everything migrated correctly.

Types of changes

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

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Warchamp7 Warchamp7 added this to the OBS Studio 33.0 milestone Oct 15, 2026
@RytoEX RytoEX added the kind/bug Categorizes issue or PR as related to a bug. label Oct 15, 2026
Comment thread obs-browser-plugin.cpp Resolved
@github-project-automation github-project-automation Bot moved this from Ready For Review to Requires Changes in Current Release Tracker (33.0) Oct 16, 2026
Passing a std::string to std::filesystem will use the system codepage.
On Windows, this means it will interpret const char* as ANSI but the
paths returned by libobs are utf8.

If the path only contains ASCII characters, then everything is fine. If
the path contains non ASCII characters, then it leads to errors.
@github-project-automation github-project-automation Bot moved this from Requires Changes to Ready For Merge in Current Release Tracker (33.0) Oct 16, 2026
@RytoEX
RytoEX merged commit 4d341a6 into obsproject:master Oct 16, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Ready For Merge to Merged in Current Release Tracker (33.0) Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants