1
0
Fork 0
forked from fte/fteqw

Fix windows build issue.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5807 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-02-15 21:43:54 +00:00
parent df98b816ce
commit ed08236922

View file

@ -490,7 +490,7 @@ static void PKG_ParseOldPack(struct pkgctx_s *ctx)
char oldpack[MAX_OSPATH]; char oldpack[MAX_OSPATH];
WIN32_FIND_DATA fd; WIN32_FIND_DATA fd;
HANDLE h; HANDLE h;
QCC_Canonicalize(oldpack, sizeof(oldpack), token, ctx->gamepath); QCC_JoinPaths(oldpack, sizeof(oldpack), token, ctx->gamepath);
h = FindFirstFile(oldpack, &fd); h = FindFirstFile(oldpack, &fd);
if (h == INVALID_HANDLE_VALUE) if (h == INVALID_HANDLE_VALUE)
ctx->messagecallback(ctx->userctx, "wildcard string '%s' found no files\n", token); ctx->messagecallback(ctx->userctx, "wildcard string '%s' found no files\n", token);
@ -498,7 +498,7 @@ static void PKG_ParseOldPack(struct pkgctx_s *ctx)
{ {
do do
{ {
QCC_Canonicalize(token, sizeof(token), fd.cFileName, oldpack); QCC_JoinPaths(token, sizeof(token), fd.cFileName, oldpack);
PKG_AddOldPack(ctx, token); PKG_AddOldPack(ctx, token);
} while(FindNextFile(h, &fd)); } while(FindNextFile(h, &fd));
} }
@ -661,7 +661,7 @@ static void PKG_AddClassFiles(struct pkgctx_s *ctx, struct class_s *c, const cha
WIN32_FIND_DATA fd; WIN32_FIND_DATA fd;
HANDLE h; HANDLE h;
char basepath[MAX_PATH]; char basepath[MAX_PATH];
QCC_Canonicalize(basepath, sizeof(basepath), fname, ctx->sourcepath); QCC_JoinPaths(basepath, sizeof(basepath), fname, ctx->sourcepath);
h = FindFirstFile(basepath, &fd); h = FindFirstFile(basepath, &fd);
if (h == INVALID_HANDLE_VALUE) if (h == INVALID_HANDLE_VALUE)
ctx->messagecallback(ctx->userctx, "wildcard string '%s' found no files\n", fname); ctx->messagecallback(ctx->userctx, "wildcard string '%s' found no files\n", fname);
@ -669,7 +669,7 @@ static void PKG_AddClassFiles(struct pkgctx_s *ctx, struct class_s *c, const cha
{ {
do do
{ {
QCC_Canonicalize(basepath, sizeof(basepath), fd.cFileName, fname); QCC_JoinPaths(basepath, sizeof(basepath), fd.cFileName, fname);
PKG_AddClassFile(ctx, c, basepath, filetime_to_timet(fd.ftLastWriteTime)); PKG_AddClassFile(ctx, c, basepath, filetime_to_timet(fd.ftLastWriteTime));
} while(FindNextFile(h, &fd)); } while(FindNextFile(h, &fd));
} }