From 765720dbd944f9dea5c1b076b6efc743cda86756 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Wed, 19 Aug 2015 21:51:28 -0700 Subject: [PATCH] small fix --- CHANGES | 9 +++++++++ shadowsocks-csharp/Util/Util.cs | 7 ++++--- shadowsocks-csharp/View/LogForm.cs | 3 ++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 2ddecc94..647c146f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,12 @@ +2.5.6 2015-08-19 +- Add portable mode +- Support server reorder + +2.5.5 2015-08-17 +- Fix crash when enabling Availability Statistics and some servers can not be resolved +- Allow multiple instances +- Other fixes + 2.5.4 2015-08-16 - Hide Privoxy icon diff --git a/shadowsocks-csharp/Util/Util.cs b/shadowsocks-csharp/Util/Util.cs index 8cbdb31d..1858ee90 100755 --- a/shadowsocks-csharp/Util/Util.cs +++ b/shadowsocks-csharp/Util/Util.cs @@ -14,16 +14,17 @@ namespace Shadowsocks.Util // return path to store temporary files public static string GetTempPath() { - if (File.Exists(Application.StartupPath + "/shadowsocks_portable_mode.txt")) + if (File.Exists(Application.StartupPath + "\\shadowsocks_portable_mode.txt")) { try { - Directory.CreateDirectory(Application.StartupPath + "/temp"); + Directory.CreateDirectory(Application.StartupPath + "\\temp"); } catch (Exception e) { Console.WriteLine(e); } - return Application.StartupPath + "/temp"; + // don't use "/", it will fail when we call explorer /select xxx/temp\xxx.log + return Application.StartupPath + "\\temp"; } return Path.GetTempPath(); } diff --git a/shadowsocks-csharp/View/LogForm.cs b/shadowsocks-csharp/View/LogForm.cs index bdb9ad5c..d9255853 100644 --- a/shadowsocks-csharp/View/LogForm.cs +++ b/shadowsocks-csharp/View/LogForm.cs @@ -91,7 +91,8 @@ namespace Shadowsocks.View private void menuItem2_Click(object sender, EventArgs e) { - string argument = @"/select, " + filename; + string argument = "/select, \"" + filename + "\""; + Console.WriteLine(argument); System.Diagnostics.Process.Start("explorer.exe", argument); }