@@ -300,7 +300,7 @@ window.J2S = J2S = (function() {
300300 }
301301
302302 var fixProtocol = function ( url ) {
303- if ( url . indexOf ( "file://" ) >= 0 )
303+ if ( ! J2S . _isFile && url . indexOf ( "file://" ) >= 0 )
304304 url = "http" + url . substring ( 4 ) ;
305305 // force https if page is https
306306 if ( J2S . _httpProto == "https://" && url . indexOf ( "http://" ) == 0 )
@@ -877,7 +877,8 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
877877 fileName = fileName . substring ( 10 ) ;
878878 else if ( fileName . indexOf ( "http://./" ) == 0 )
879879 fileName = fileName . substring ( 9 ) ;
880- else if ( fileName . indexOf ( "file:" ) >= 0 )
880+ else if ( fileName . indexOf ( "file:/" ) >= 0
881+ && fileName . indexOf ( J2S . thisApplet . __Info . j2sPath ) != 0 )
881882 fileName = "./" + fileName . substring ( 5 ) ;
882883 isBinary = ( isBinary || J2S . isBinaryUrl ( fileName ) ) ;
883884 var isPDB = ( fileName . indexOf ( "pdb.gz" ) >= 0 && fileName
@@ -953,7 +954,7 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
953954 }
954955
955956 J2S . _xhrReturn = function ( xhr ) {
956- if ( xhr . state ( ) == "rejected" )
957+ if ( xhr . state ( ) == "rejected" && ! xhr . responseText )
957958 return null ;
958959 if ( ! xhr . responseText && ! xhr . responseJSON
959960 || Clazz . instanceOf ( xhr . response , self . ArrayBuffer ) ) {
0 commit comments