diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-04-15 20:02:17 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-04-15 20:02:17 +0300 |
commit | 9daec8b17aba72115ffd4a92a3af5b404fb3a78b (patch) | |
tree | 6e5f20a99ea10067a1b4cf730c00c44890bad086 /Program.cs | |
parent | 98b8cbb3d98de19f99f8f7821b2b58c894bf9440 (diff) |
Some fixes
Diffstat (limited to 'Program.cs')
-rw-r--r-- | Program.cs | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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);
|