Skip to content

Commit f2eaa51

Browse files
committed
Updater: Enable nightly builds by default (If user installs a nightly build)
1 parent d822a53 commit f2eaa51

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

plugins/Updater/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ LOGICAL DllMain(
9191
{
9292
{ IntegerSettingType, SETTING_NAME_AUTO_CHECK, L"1" },
9393
{ StringSettingType, SETTING_NAME_LAST_CHECK, L"0" },
94+
#ifdef VIRUSTOTAL_API
95+
{ IntegerSettingType, SETTING_NAME_NIGHTLY_BUILD, L"1" }
96+
#else
9497
{ IntegerSettingType, SETTING_NAME_NIGHTLY_BUILD, L"0" }
98+
#endif
9599
};
96100

97101
PluginInstance = PhRegisterPlugin(PLUGIN_NAME, Instance, &info);

plugins/Updater/updater.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ NTSTATUS UpdateDownloadThread(
767767
goto CleanupExit;
768768

769769
// Create the directory if it does not exist.
770-
if (fullSetupPath = PhGetFullPath(PhGetStringOrEmpty(context->SetupFilePath), &indexOfFileName))
770+
if (fullSetupPath = PhGetFullPath(PhGetString(context->SetupFilePath), &indexOfFileName))
771771
{
772772
PPH_STRING directoryPath;
773773

@@ -784,7 +784,7 @@ NTSTATUS UpdateDownloadThread(
784784
// Create output file
785785
if (!NT_SUCCESS(PhCreateFileWin32(
786786
&tempFileHandle,
787-
PhGetStringOrEmpty(context->SetupFilePath),
787+
PhGetString(context->SetupFilePath),
788788
FILE_GENERIC_READ | FILE_GENERIC_WRITE,
789789
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED | FILE_ATTRIBUTE_TEMPORARY,
790790
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,

0 commit comments

Comments
 (0)