ui: Fixed crash in FilePath::makeCanonical and QtPathListBox making all settings paths relative
This commit is contained in:
@@ -186,7 +186,15 @@ FilePath& FilePath::makeCanonical()
|
||||
}
|
||||
}
|
||||
#else
|
||||
canonicalPath = boost::filesystem::canonical(getPath());
|
||||
try
|
||||
{
|
||||
canonicalPath = boost::filesystem::canonical(getPath());
|
||||
}
|
||||
catch (boost::filesystem::filesystem_error e)
|
||||
{
|
||||
LOG_ERROR_STREAM(<< e.what());
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
m_path = std::make_unique<boost::filesystem::path>(canonicalPath);
|
||||
m_canonicalized = true;
|
||||
|
||||
@@ -61,7 +61,6 @@ void QtPathListBox::setPaths(const std::vector<FilePath>& list, bool readOnly)
|
||||
|
||||
for (FilePath path : list)
|
||||
{
|
||||
makeRelative(path);
|
||||
QtListBoxItem* item = addListBoxItemWithText(QString::fromStdWString(path.wstr()));
|
||||
item->setReadOnly(readOnly);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user