mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-28 08:48:59 -04:00
frontend: Fix profile import with trailing path slash
The directory chooser can return a path that ends with a separator, e.g. when the path is typed manually or on some platform dialogs. std::filesystem::path::filename() returns an empty string for such a path, so the imported profile gets an empty directory name and its files are copied directly into the profiles root instead of a new profile directory. No new profile appears in the profile list. Normalize the selected path with QDir::cleanPath() before building the filesystem path, which strips the trailing separator and yields the actual directory name.
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f