diff --git a/EverythingToolbar/EverythingSearch.cs b/EverythingToolbar/EverythingSearch.cs index 320e6ca00..5cdf6efd3 100644 --- a/EverythingToolbar/EverythingSearch.cs +++ b/EverythingToolbar/EverythingSearch.cs @@ -128,6 +128,8 @@ private void OnSettingChanged(object sender, PropertyChangedEventArgs e) public bool Initialize() { + SetInstanceName(Settings.Default.instanceName); + var major = Everything_GetMajorVersion(); var minor = Everything_GetMinorVersion(); var revision = Everything_GetRevision(); @@ -135,7 +137,6 @@ public bool Initialize() if (major > 1 || (major == 1 && minor > 4) || (major == 1 && minor == 4 && revision >= 1)) { _logger.Info("Everything version: {major}.{minor}.{revision}", major, minor, revision); - SetInstanceName(Settings.Default.instanceName); return true; } @@ -154,13 +155,9 @@ public bool Initialize() public void SetInstanceName(string name) { - if (name == "") - { - Everything_SetInstanceName(""); - return; - } - - _logger.Info("Setting Everything instance name: " + name); + if (name != string.Empty) + _logger.Info("Setting Everything instance name: " + name); + Everything_SetInstanceName(name); }