@@ -35,6 +35,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
35
35
#include " settings.h"
36
36
#include < scopeguard.h>
37
37
#include < utility.h>
38
+ #include " shared/util.h"
38
39
39
40
#include < QApplication>
40
41
#include < QDateTime>
@@ -632,6 +633,7 @@ InstallationResult InstallationManager::install(const QString& fileName,
632
633
});
633
634
634
635
QFileInfo fileInfo (fileName);
636
+ QString url;
635
637
if (!getSupportedExtensions ().contains (fileInfo.suffix (), Qt::CaseInsensitive)) {
636
638
reportError (tr (" File format \" %1\" not supported" ).arg (fileInfo.suffix ()));
637
639
return InstallationResult (IPluginInstaller::RESULT_FAILED);
@@ -655,6 +657,7 @@ InstallationResult InstallationManager::install(const QString& fileName,
655
657
QSettings metaFile (metaName, QSettings::IniFormat);
656
658
gameName = metaFile.value (" gameName" , " " ).toString ();
657
659
modID = metaFile.value (" modID" , 0 ).toInt ();
660
+ url = metaFile.value (" url" , " " ).toString ();
658
661
QTextDocument doc;
659
662
doc.setHtml (metaFile.value (" name" , " " ).toString ());
660
663
modName.update (doc.toPlainText (), GUESS_FALLBACK);
@@ -700,8 +703,14 @@ InstallationResult InstallationManager::install(const QString& fileName,
700
703
// information
701
704
QString guessedModName;
702
705
int guessedModID = modID;
703
- NexusInterface::interpretNexusFileName (QFileInfo (fileName).fileName (),
704
- guessedModName, guessedModID, false );
706
+
707
+ if (isNxmLink (url))
708
+ NexusInterface::interpretNexusFileName (QFileInfo (fileName).fileName (),
709
+ guessedModName, guessedModID, false );
710
+ else
711
+ NexusInterface::interpretNonNexusFileName (QFileInfo (fileName).fileName (),
712
+ guessedModName, guessedModID, false );
713
+
705
714
if ((modID == 0 ) && (guessedModID != -1 )) {
706
715
modID = guessedModID;
707
716
} else if (modID != guessedModID) {
0 commit comments