Make the previous portable mode as default

- change dir name to "ss_win_temp" to make things clear.
- throw any exception caught when creating temp folder

To workaround silly cleaning softwares and careless users.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
Syrone Wong
2017-01-11 14:05:11 +08:00
parent b266bf42f5
commit 4c49f1b736
3 changed files with 19 additions and 49 deletions
@@ -121,21 +121,13 @@ namespace Shadowsocks.Controller
{
try
{
if (Utils.IsPortableMode())
{
/*
* Under PortableMode, we could identify it by the path of ss_privoxy.exe.
*/
var path = process.MainModule.FileName;
/*
* Under PortableMode, we could identify it by the path of ss_privoxy.exe.
*/
var path = process.MainModule.FileName;
return Utils.GetTempPath("ss_privoxy.exe").Equals(path);
}
else
{
var cmd = process.GetCommandLine();
return Utils.GetTempPath("ss_privoxy.exe").Equals(path);
return cmd.Contains(_uniqueConfigFile);
}
}
catch (Exception ex)
{