Nicolas Cannasse преди 18 години
родител
ревизия
bf1cd6619d
променени са 2 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 2 0
      doc/CHANGES.txt
  2. 5 2
      std/neko/net/ProxyDetect.hx

+ 2 - 0
doc/CHANGES.txt

@@ -1,5 +1,7 @@
 2007-??-??: 1.12
 2007-??-??: 1.12
 	added flash lite support with -D flash_lite
 	added flash lite support with -D flash_lite
+	bugfix for Unknown<X> should Unknown<X>
+	prevent some exceptions in neko.net.ProxyDetect
 
 
 2007-01-28: 1.11
 2007-01-28: 1.11
 	changed StringBuf.add implementation
 	changed StringBuf.add implementation

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

@@ -57,7 +57,7 @@ class ProxyDetect {
 	}
 	}
 
 
 	static function detectFF( basedir : String ) {
 	static function detectFF( basedir : String ) {
-		var files = try neko.FileSystem.readDirectory(basedir) catch( e : Dynamic ) throw "Invalid Firefox config directory "+basedir;
+		var files = try neko.FileSystem.readDirectory(basedir) catch( e : Dynamic ) return null;
 		var profile = null;
 		var profile = null;
 		for( f in files )
 		for( f in files )
 			if( f.substr(-8) == ".default" ) {
 			if( f.substr(-8) == ".default" ) {
@@ -84,7 +84,10 @@ class ProxyDetect {
 	}
 	}
 
 
 	static function detectIE() {
 	static function detectIE() {
-		var temp = neko.Sys.getEnv("TMP") + "/proxy.txt";
+		var dir = neko.Sys.getEnv("TMP");
+		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 )
 		if( neko.Sys.command('regedit /E "'+temp+'" "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"') != 0 )
 			throw "Failed to call REGEDIT";
 			throw "Failed to call REGEDIT";
 		var content = neko.io.File.getContent(temp);
 		var content = neko.io.File.getContent(temp);