mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-17 01:11:18 +00:00
Don't try to interpret http(s) uris as quake servers to connect to (should help fix the webgl port).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6036 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
eea586dd13
commit
b33d20fa75
1 changed files with 9 additions and 3 deletions
|
@ -6008,16 +6008,22 @@ qboolean Host_RunFile(const char *fname, int nlen, vfsfile_t *file)
|
||||||
fname = utf8;
|
fname = utf8;
|
||||||
nlen = strlen(fname);
|
nlen = strlen(fname);
|
||||||
}
|
}
|
||||||
else
|
#elif defined(FTE_TARGET_WEB)
|
||||||
#elif !defined(FTE_TARGET_WEB)
|
if (nlen >= 8 && !strncmp(fname, "file:///", 8))
|
||||||
|
{ //just here so we don't get confused by the arbitrary scheme check below.
|
||||||
|
}
|
||||||
|
#else
|
||||||
//unix file urls are fairly consistant - must be an absolute path.
|
//unix file urls are fairly consistant - must be an absolute path.
|
||||||
if (nlen >= 8 && !strncmp(fname, "file:///", 8))
|
if (nlen >= 8 && !strncmp(fname, "file:///", 8))
|
||||||
{
|
{
|
||||||
fname += 7;
|
fname += 7;
|
||||||
nlen -= 7;
|
nlen -= 7;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
|
else if((nlen >= 7 && !strncmp(fname, "http://", 7)) ||
|
||||||
|
(nlen >= 8 && !strncmp(fname, "https://", 8)))
|
||||||
|
; //don't interpret these as our custom uri schemes
|
||||||
|
else
|
||||||
{
|
{
|
||||||
const char *schemeend = strstr(fname, "://");
|
const char *schemeend = strstr(fname, "://");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue