Change extension checks so they can reach the false condition

This commit is contained in:
Liderate
2024-01-26 00:49:37 -05:00
parent 4fb046fe04
commit 07b91c641b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ namespace BsaPacker
QStringList ModContext::GetPlugins(const QDir& modDirectory) const
{
const QString extension = (this->GetNexusId() == NexusId::Fallout4 || NexusId::Starfield) ? ".ba2" : ".bsa";
const int nexusId = this->GetNexusId();
const QString extension = (nexusId == NexusId::Fallout4 || nexusId == NexusId::Starfield) ? ".ba2" : ".bsa";
const std::function<QString(QString)> replace_extension = [&](QString fname) {
return fname.replace(fname.lastIndexOf('.'), 4, extension);
};
+1 -1
View File
@@ -34,7 +34,7 @@ namespace BsaPacker
const QString& pluginName = this->m_PackerDialog->SelectedPluginItem();
const bool needsNewName = this->m_PackerDialog->IsNewFilename();
const QString& archiveName = ModDtoFactory::ArchiveNameValidator(modName, pluginName, needsNewName);
const QString& archiveExtension = (nexusId == FALLOUT_4_NEXUS_ID || STARFIELD_NEXUS_ID)
const QString& archiveExtension = (nexusId == FALLOUT_4_NEXUS_ID || nexusId == STARFIELD_NEXUS_ID)
? QStringLiteral(".ba2")
: QStringLiteral(".bsa");