small fix

This commit is contained in:
clowwindy
2015-08-19 21:51:28 -07:00
parent c767f55b3c
commit 765720dbd9
3 changed files with 15 additions and 4 deletions
+9
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
- Hide Privoxy icon
+4 -3
View File
@@ -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();
}
+2 -1
View File
@@ -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);
}