ui: Fixed crash in FilePath::makeCanonical and QtPathListBox making all settings paths relative

This commit is contained in:
Eberhard Graether
2018-04-24 11:44:28 +02:00
parent b00bfb8964
commit c5d0362df5
2 changed files with 9 additions and 2 deletions
+9 -1
View File
@@ -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;
-1
View File
@@ -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);
}