From bc5603d5ca62e69ec300ceca3d5a364b5ffcaf43 Mon Sep 17 00:00:00 2001 From: rxtur Date: Sun, 11 Sep 2016 17:13:16 -0500 Subject: [PATCH] Setup to not delete widgets data for version over 3.3 --- BlogEngine/BlogEngine.NET/setup/upgrade/Updater.asmx | 11 +++++++++-- BlogEngine/BlogEngine.NET/setup/upgrade/setup.txt | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/BlogEngine/BlogEngine.NET/setup/upgrade/Updater.asmx b/BlogEngine/BlogEngine.NET/setup/upgrade/Updater.asmx index b193649f4..d743d67c9 100644 --- a/BlogEngine/BlogEngine.NET/setup/upgrade/Updater.asmx +++ b/BlogEngine/BlogEngine.NET/setup/upgrade/Updater.asmx @@ -233,7 +233,14 @@ public class Updater : WebService { DeleteDir("\\editors"); DeleteDir("\\Modules"); DeleteDir("\\pics"); - DeleteDir("\\App_Data\\datastore\\widgets"); + + // in version 3.3.0.0 widgets framework updated + // and no longer compatible. delete for lesser versions + int version = int.Parse(BlogSettings.Instance.Version().Replace(".", "")); + if (version <= 3300) + { + DeleteDir("\\App_Data\\datastore\\widgets"); + } ReplaceDir("\\Account"); ReplaceDir("\\admin"); @@ -250,7 +257,7 @@ public class Updater : WebService { ReplaceDir("\\Content"); ReplaceDir("\\Custom\\Themes\\Standard"); ReplaceDir("\\Custom\\Widgets"); - + return ""; } catch (Exception ex) diff --git a/BlogEngine/BlogEngine.NET/setup/upgrade/setup.txt b/BlogEngine/BlogEngine.NET/setup/upgrade/setup.txt index 53cec582d..7793cabe0 100644 --- a/BlogEngine/BlogEngine.NET/setup/upgrade/setup.txt +++ b/BlogEngine/BlogEngine.NET/setup/upgrade/setup.txt @@ -1 +1 @@ -3.3.0.0 \ No newline at end of file +3.3.1.0 \ No newline at end of file