Ref T436, correct file name handling (UNC) and validate FSX position

This commit is contained in:
Klaus Basan
2018-11-18 19:40:34 +01:00
parent 3434abefb0
commit 82467da45b
3 changed files with 17 additions and 5 deletions

View File

@@ -140,13 +140,18 @@ namespace BlackMisc
{
CStatusMessageList msgs;
const ModelType t = this->getModelType();
if (t == TypeOwnSimulatorModel || t == TypeManuallySet || t == TypeDatabaseEntry)
if (t == TypeOwnSimulatorModel || t == TypeManuallySet || t == TypeDatabaseEntry || t == TypeModelMatching || t == TypeModelMatchingDefaultModel)
{
if (!this->hasExistingCorrespondingFile())
{
const CStatusMessage m = CStatusMessage(this).validationError("File '%1' not readable") << this->getFileName();
msgs.push_back(m);
}
else
{
const CStatusMessage m = CStatusMessage(this).validationInfo("File '%1' existing") << this->getFileName();
msgs.push_back(m);
}
}
else
{
@@ -682,7 +687,7 @@ namespace BlackMisc
bool CAircraftModel::hasExistingCorrespondingFile() const
{
if (!this->hasFileName()) { return false; }
const QFileInfo fi(this->getFileName());
const QFileInfo fi(CFileUtils::fixWindowsUncPath(this->getFileName()));
return (fi.exists() && fi.isReadable());
}