Work around crash in std::filesystem due to unexpected char encoding

This commit is contained in:
WarmUpTill
2024-09-01 17:12:16 +02:00
committed by WarmUpTill
parent 2d035758f4
commit 94263cc7a0
3 changed files with 11 additions and 11 deletions

View File

@@ -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(