summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/DlgUpdate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater/src/DlgUpdate.cpp')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index baa2d0e90d..90a5a3be48 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -203,22 +203,8 @@ public:
Window_SetIcon_IcoLib(m_hwnd, g_plugin.getIconHandle(IDI_MENU));
- if (IsWinVerVistaPlus()) {
- TFileName wszPath;
- GetModuleFileName(nullptr, wszPath, _countof(wszPath));
- wchar_t *ext = wcsrchr(wszPath, '.');
- if (ext != nullptr)
- *ext = '\0';
- wcscat(wszPath, L".test");
- HANDLE hFile = CreateFileW(wszPath, GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
- if (hFile == INVALID_HANDLE_VALUE)
- // Running Windows Vista or later (major version >= 6).
- Button_SetElevationRequiredState(btnOk.GetHwnd(), !PU::IsProcessElevated());
- else {
- CloseHandle(hFile);
- DeleteFileW(wszPath);
- }
- }
+ if (!PU::IsMirandaFolderWritable())
+ Button_SetElevationRequiredState(btnOk.GetHwnd(), !PU::IsProcessElevated());
// Initialize the LVCOLUMN structure.
// The mask specifies that the format, width, text, and