From 0198fb8fff2ab74c84eb7aa54a271168c3c3cd64 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Thu, 21 Aug 2014 21:00:07 +0200 Subject: [PATCH] Fixed issue #1097. The settings were wiped on startup. --- Duplicati/Server/Database/ApplicationSettings.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Duplicati/Server/Database/ApplicationSettings.cs b/Duplicati/Server/Database/ApplicationSettings.cs index b7cdca20e..3951cd187 100644 --- a/Duplicati/Server/Database/ApplicationSettings.cs +++ b/Duplicati/Server/Database/ApplicationSettings.cs @@ -60,12 +60,8 @@ namespace Duplicati.Server.Database string nx; m_values.Clear(); - var settings = m_connection.GetSettings(Connection.APP_SETTINGS_ID).ToDictionary(x => x.Name, x => x.Value); - foreach(var n in typeof(CONST).GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.DeclaredOnly | System.Reflection.BindingFlags.Static).Select(x => (string)x.GetValue(null))) - { - settings.TryGetValue(n, out nx); - m_values[n] = nx; - } + foreach(var n in m_connection.GetSettings(Connection.APP_SETTINGS_ID)) + m_values[n.Name] = n.Value; } }