summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/directoryrefresher.cpp5
-rw-r--r--src/mainwindow.cpp20
-rw-r--r--src/organizer_en.ts2
-rw-r--r--src/pluginlist.cpp2
4 files changed, 17 insertions, 12 deletions
diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp
index 063cd328..9bbef3f2 100644
--- a/src/directoryrefresher.cpp
+++ b/src/directoryrefresher.cpp
@@ -265,6 +265,11 @@ void DirectoryRefresher::stealModFilesIntoStructure(
for (const QString &filename : stealFiles) {
if (filename.isEmpty()) {
log::warn("Trying to find file with no name");
+ log::warn(" . modName: {}", modName);
+ log::warn(" . directory: {}", directory);
+ log::warn(" . priority: {}", priority);
+ for (int i = 0; i < stealFiles.length(); ++i)
+ log::warn(" . stealFiles[{}]: {}", i, stealFiles[i]);
continue;
}
QFileInfo fileInfo(filename);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 81c44c00..a2cc74dd 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1782,7 +1782,7 @@ void MainWindow::updateBSAList(const QStringList &defaultArchives, const QString
auto hasAssociatedPlugin = [&](const QString &bsaName) -> bool {
for (const QString &pluginName : plugins) {
QFileInfo pluginInfo(pluginName);
- if (bsaName.startsWith(QFileInfo(pluginName).baseName(), Qt::CaseInsensitive)
+ if (bsaName.startsWith(QFileInfo(pluginName).completeBaseName(), Qt::CaseInsensitive)
&& (m_OrganizerCore.pluginList()->state(pluginInfo.fileName()) == IPluginList::STATE_ACTIVE)) {
return true;
}
@@ -2951,11 +2951,11 @@ void MainWindow::nxmUpdatesAvailable(QString gameName, int modID, QVariant userD
if (fileData["file_name"].toString().compare(installedFile, Qt::CaseInsensitive) == 0) {
foundFileData = fileData;
newModStatus = foundFileData["category_id"].toInt();
-
+
if (newModStatus != NexusInterface::FileStatus::OLD_VERSION &&
newModStatus != NexusInterface::FileStatus::REMOVED &&
newModStatus != NexusInterface::FileStatus::ARCHIVED) {
-
+
// since the file is still active if there are no updates for it, use this as current version
validNewVersion = foundFileData["version"].toString();
}
@@ -3022,10 +3022,10 @@ void MainWindow::nxmUpdatesAvailable(QString gameName, int modID, QVariant userD
}
}
}
-
+
// if there were no active direct file updates for the installedFile
- if (!foundActiveUpdate) {
- // get the global mod version in case the file isn't an optional
+ if (!foundActiveUpdate) {
+ // get the global mod version in case the file isn't an optional
if (newModStatus != NexusInterface::FileStatus::OPTIONAL_FILE &&
newModStatus != NexusInterface::FileStatus::MISCELLANEOUS) {
requiresInfo = true;
@@ -3061,7 +3061,7 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD
QVariantMap result = resultData.toMap();
QString gameNameReal;
bool foundUpdate = false;
-
+
for (IPluginGame *game : m_PluginContainer.plugins<IPluginGame>()) {
if (game->gameNexusName() == gameName) {
gameNameReal = game->gameShortName();
@@ -3077,8 +3077,8 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD
// if file is still listed as optional or miscellaneous don't update the version as often optional files are left
// with an older version than the main mod version.
- if (!result["version"].toString().isEmpty() &&
- mod->getNexusFileStatus() != NexusInterface::FileStatus::OPTIONAL_FILE &&
+ if (!result["version"].toString().isEmpty() &&
+ mod->getNexusFileStatus() != NexusInterface::FileStatus::OPTIONAL_FILE &&
mod->getNexusFileStatus() != NexusInterface::FileStatus::MISCELLANEOUS) {
mod->setNewestVersion(result["version"].toString());
@@ -3101,7 +3101,7 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD
else
mod->setIsEndorsed(false);
}
-
+
mod->setLastNexusQuery(QDateTime::currentDateTimeUtc());
mod->setNexusLastModified(QDateTime::fromSecsSinceEpoch(result["updated_timestamp"].toInt(), Qt::UTC));
diff --git a/src/organizer_en.ts b/src/organizer_en.ts
index 1d56d0f8..fb665f6c 100644
--- a/src/organizer_en.ts
+++ b/src/organizer_en.ts
@@ -679,7 +679,7 @@ p, li { white-space: pre-wrap; }
<context>
<name>DirectoryRefresher</name>
<message>
- <location filename="directoryrefresher.cpp" line="457"/>
+ <location filename="directoryrefresher.cpp" line="462"/>
<source>failed to read mod (%1): %2</source>
<translation type="unfinished"></translation>
</message>
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index bec7f0c3..3812143a 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -220,7 +220,7 @@ void PluginList::refresh(const QString &profileName
FilesOrigin &origin = baseDirectory.getOriginByID(current->getOrigin(archive));
//name without extension
- QString baseName = QFileInfo(filename).baseName();
+ QString baseName = QFileInfo(filename).completeBaseName();
QString iniPath = baseName + ".ini";
bool hasIni = baseDirectory.findFile(ToWString(iniPath)).get() != nullptr;