Skip to content

Commit ebe25a7

Browse files
committed
#5346 Properly reset version flag.
1 parent adee09a commit ebe25a7

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

indra/newview/llappviewerwin32.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,20 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
435435
if (!velopack_initialize())
436436
{
437437
// Velopack handled the invocation (install/uninstall hook)
438+
439+
// Drop install related settings
440+
gDirUtilp->initAppDirs("SecondLife");
441+
442+
std::string user_settings_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml");
443+
LLControlGroup settings("global");
444+
if (settings.loadFromFile(user_settings_path))
445+
{
446+
if (settings.controlExists("LastInstallVersion"))
447+
{
448+
settings.setString("LastInstallVersion", std::string());
449+
}
450+
settings.saveToFile(user_settings_path, true);
451+
}
438452
return 0;
439453
}
440454
#endif

indra/newview/llstartup.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2619,15 +2619,12 @@ void release_notes_coro(const std::string url)
26192619
void uninstall_nsis_if_required()
26202620
{
26212621
#if LL_VELOPACK && LL_WINDOWS
2622-
// Todo: perhaps use marker files?
2623-
// Debug variable isn't specific to one channel
2624-
// and something channel specific is needed.
26252622
std::string last_install_ver = gSavedSettings.getString("LastInstallVersion");
2626-
LLVersionInfo* ver_inst = LLVersionInfo::getInstance();
2627-
if (ver_inst->getChannelAndVersion() == last_install_ver)
2623+
if (!last_install_ver.empty())
26282624
{
26292625
return;
26302626
}
2627+
LLVersionInfo* ver_inst = LLVersionInfo::getInstance();
26312628
gSavedSettings.setString("LastInstallVersion",
26322629
ver_inst->getChannelAndVersion());
26332630

0 commit comments

Comments
 (0)