From 191a6db2fb7af2a4c658ed0b35fa18a206d28928 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Wed, 15 Mar 2017 00:17:27 +0500 Subject: [PATCH] Reorder command line arguments check and registry operations. When openvpn is not installed, HKLM\Software\OpenVPN registry is missing, however, it should not fail on running "openvpn-gui.exe --help". Such usage might be useful for smoke testing, for example (build openvpn-gui.exe on AppVeyor, run it, check whether window is shown or not) --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index ed676e3..1fd4a99 100644 --- a/main.c +++ b/main.c @@ -174,12 +174,12 @@ int WINAPI _tWinMain (HINSTANCE hThisInstance, exit(1); } - UpdateRegistry(); /* Checks version change and update keys/values */ - - GetRegistryKeys(); /* Parse command-line options */ ProcessCommandLine(&o, GetCommandLine()); + UpdateRegistry(); /* Checks version change and update keys/values */ + GetRegistryKeys(); + EnsureDirExists(o.config_dir); if (!CheckVersion()) {