Skip to content

bug: frontend: importing a profile from a path with a trailing slash copies it into the profiles folder itself (upstream #13862) #2295

Closed

Description

@rdoupe

Upstream OBS bug obsproject/obs-studio#13862, fixed upstream in obsproject/obs-studio PR 13863 after obs-rust's base.

Bug

Importing a profile from a folder path that ends in a slash copies the profile's files into the profiles folder itself, not into a folder of their own. A second import then fails with "File exists".

Cause: std::filesystem::path("/a/MyProfile/").filename() is empty, so the destination becomes basic/profiles/ (frontend/widgets/OBSBasic_Profiles.cpp.hpp around line 589). The macOS folder dialog returns a trailing slash, and a typed path in the Qt dialog can too. The code is shared by all platforms.

Plan

  1. RED: a Qt cmocka test of the folder name taken from the selected path: /x/MyProfile/ gives MyProfile, plus edge cases. Check the scene collection import for the same pattern.
  2. GREEN: clean the path first, as upstream does (QDir::cleanPath).

Activity

  1. added
    bug
    on Oct 25, 2026
  2. rdoupe commented on Oct 25, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #2295.

  3. added
    claimed
    on Oct 25, 2026
  4. added
    ready
    and removed
    claimed
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions