Browse Source

small fix

tags/2.5.6
clowwindy 9 years ago
parent
commit
765720dbd9
3 changed files with 15 additions and 4 deletions
  1. +9
    -0
      CHANGES
  2. +4
    -3
      shadowsocks-csharp/Util/Util.cs
  3. +2
    -1
      shadowsocks-csharp/View/LogForm.cs

+ 9
- 0
CHANGES View File

@@ -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 2.5.4 2015-08-16
- Hide Privoxy icon - Hide Privoxy icon




+ 4
- 3
shadowsocks-csharp/Util/Util.cs View File

@@ -14,16 +14,17 @@ namespace Shadowsocks.Util
// return path to store temporary files // return path to store temporary files
public static string GetTempPath() public static string GetTempPath()
{ {
if (File.Exists(Application.StartupPath + "/shadowsocks_portable_mode.txt"))
if (File.Exists(Application.StartupPath + "\\shadowsocks_portable_mode.txt"))
{ {
try try
{ {
Directory.CreateDirectory(Application.StartupPath + "/temp");
Directory.CreateDirectory(Application.StartupPath + "\\temp");
} catch (Exception e) } catch (Exception e)
{ {
Console.WriteLine(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(); return Path.GetTempPath();
} }


+ 2
- 1
shadowsocks-csharp/View/LogForm.cs View File

@@ -91,7 +91,8 @@ namespace Shadowsocks.View
private void menuItem2_Click(object sender, EventArgs e) 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); System.Diagnostics.Process.Start("explorer.exe", argument);
} }


Loading…
Cancel
Save