Nicolas Cannasse 17 年 前
コミット
e8242b29c1
1 ファイル変更4 行追加2 行削除
  1. 4 2
      std/neko/net/ProxyDetect.hx

+ 4 - 2
std/neko/net/ProxyDetect.hx

@@ -92,8 +92,10 @@ class ProxyDetect {
 		if( dir == null )
 			dir = ".";
 		var temp = dir + "/proxy.txt";
-		if( neko.Sys.command('regedit /E "'+temp+'" "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"') != 0 )
-			throw "Failed to call REGEDIT";
+		if( neko.Sys.command('regedit /E "'+temp+'" "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"') != 0 ) {
+			// might fail without appropriate rights
+			return null;
+		}
 		var content = neko.io.File.getContent(temp);
 		neko.FileSystem.deleteFile(temp);
 		// turn 16-bit string into 8-bit one