From 50699a9aac21849dfd5a7cc6592c0bf3f0bdefe3 Mon Sep 17 00:00:00 2001 From: celeron533 Date: Wed, 3 Jul 2019 21:00:21 +0800 Subject: [PATCH] Fix #2431 test failed When launch from test framework, the Application.StartupPath looks like "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\EXTENSIONS\TESTPLATFORM" which may not have write permission. --- shadowsocks-csharp/Util/Util.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-csharp/Util/Util.cs b/shadowsocks-csharp/Util/Util.cs index 8130b961..653f9a2b 100755 --- a/shadowsocks-csharp/Util/Util.cs +++ b/shadowsocks-csharp/Util/Util.cs @@ -38,7 +38,7 @@ namespace Shadowsocks.Util { if (isPortableMode) { - _tempPath = Directory.CreateDirectory(Path.Combine(Application.StartupPath, "ss_win_temp")).FullName; + _tempPath = Directory.CreateDirectory("ss_win_temp").FullName; // don't use "/", it will fail when we call explorer /select xxx/ss_win_temp\xxx.log } else