From a9a51f50852c2a0b08b3a1aad8960991a6f01e32 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 10 Jan 2016 20:22:50 +0100 Subject: fixed a potential crash-cause when querying download info and slight improvement (?) to the regex that extracts the modid --- src/nexusinterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nexusinterface.cpp') diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index b8326c80..f9d9b6bd 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -193,7 +193,7 @@ void NexusInterface::loginCompleted() void NexusInterface::interpretNexusFileName(const QString &fileName, QString &modName, int &modID, bool query) { //Look for something along the lines of modulename-Vn-m + any old rubbish. - static std::regex exp("^([a-zA-Z0-9_'\"\\- ]*?)([-_ ][VvRr]?[0-9_]+)?-([1-9][0-9]+).*"); + static std::regex exp("^([a-zA-Z0-9_'\"\\-.() ]*?)([-_ ][VvRr]?[0-9_]+)?-([1-9][0-9]+).*\.(zip|rar|7z)"); static std::regex simpleexp("^([a-zA-Z0-9_]+)"); QByteArray fileNameUTF8 = fileName.toUtf8(); -- cgit v1.3.1