mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 04:11:06 -05:00
Work around crash in std::filesystem due to unexpected char encoding
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <QLayout>
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
#include <filesystem>
|
||||
|
||||
namespace advss {
|
||||
|
||||
@@ -38,8 +37,8 @@ void FileSelection::SetPath(const QString &path)
|
||||
|
||||
QString FileSelection::ValidPathOrDesktop(const QString &path)
|
||||
{
|
||||
if (std::filesystem::exists(
|
||||
std::filesystem::path(path.toStdString()))) {
|
||||
QFileInfo fileInfo(path);
|
||||
if (fileInfo.isFile()) {
|
||||
return path;
|
||||
}
|
||||
return QStandardPaths::writableLocation(
|
||||
|
||||
Reference in New Issue
Block a user