Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-04-15 20:02:17 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-04-15 20:02:17 +0300
commit9daec8b17aba72115ffd4a92a3af5b404fb3a78b (patch)
tree6e5f20a99ea10067a1b4cf730c00c44890bad086 /Program.cs
parent98b8cbb3d98de19f99f8f7821b2b58c894bf9440 (diff)
Some fixes
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Program.cs b/Program.cs
index 7d51ab69..97cac70b 100644
--- a/Program.cs
+++ b/Program.cs
@@ -29,7 +29,6 @@ namespace com.clusterrr.hakchi_gui
[STAThread]
static void Main()
{
- AppDomain.CurrentDomain.AppendPrivatePath("languages");
#if DEBUG
try
{
@@ -53,6 +52,17 @@ namespace com.clusterrr.hakchi_gui
{
if (createdNew)
{
+ // For updates
+ AppDomain.CurrentDomain.AppendPrivatePath("languages");
+ var oldFiles = Directory.GetFiles(Path.GetDirectoryName(Application.ExecutablePath), "hakchi.resources.dll", SearchOption.AllDirectories);
+ foreach (var d in oldFiles)
+ if (!d.Contains(@"\languages\"))
+ {
+ var dir = Path.GetDirectoryName(d);
+ Debug.WriteLine("Removing old directory: " + dir);
+ Directory.Delete(dir, true);
+ }
+
Debug.WriteLine("Starting, version: " + Assembly.GetExecutingAssembly().GetName().Version);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);