diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-10-15 18:44:39 +0100 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-10-15 18:44:39 +0100 |
| commit | d4754f4d3ca7451d784e89ae1ddef240666dfdf8 (patch) | |
| tree | b5b47d31c10e3b913de352c0c89337a3e1efee3e /src/shared/gameinfo.cpp | |
| parent | 1cb0a49dfc83dbc05850bd4b97ee7e5a48d2879a (diff) | |
Fix for some nexus fomods having the old version of the mod link and not the new version.
Also fixed a lot of const correctness things
Diffstat (limited to 'src/shared/gameinfo.cpp')
| -rw-r--r-- | src/shared/gameinfo.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index 1f25cec1..5338c069 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -86,6 +86,19 @@ void GameInfo::identifyMyGamesDirectory(const std::wstring &file) }
}
+bool GameInfo::isValidModURL(int modID, const std::wstring &url, const std::wstring &alt) const
+{
+ std::wostringstream os;
+ os << getNexusPage(false) << "/mods/" << modID;
+ if (url == os.str()) {
+ return true;
+ }
+ os.clear();
+ os.str(L"");
+ os << alt << "/mods/" << modID;
+ return url == os.str();
+}
+
bool GameInfo::identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath)
{
|
