From 205f3734cd973ccbe4d156d7f17c2efc94913e2d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 3 Apr 2004 20:04:59 +0000 Subject: [PATCH] quick fix to file functions --- amxmodx/file.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/amxmodx/file.cpp b/amxmodx/file.cpp index 76d9f032..c48ee0dd 100755 --- a/amxmodx/file.cpp +++ b/amxmodx/file.cpp @@ -490,6 +490,13 @@ static cell AMX_NATIVE_CALL amx_fputf(AMX *amx, cell *params) return -1; } +static cell AMX_NATIVE_CALL amx_build_pathname(AMX *amx, cell *params) +{ + int len; + char *szPath = get_amxstring(amx, params[1], 0, len); + return set_amxstring(amx, params[2], build_pathname("%s", szPath), params[3]); +} + AMX_NATIVE_INFO file_Natives[] = { { "delete_file", delete_file }, { "file_exists", file_exists }, @@ -520,6 +527,7 @@ AMX_NATIVE_INFO file_Natives[] = { { "unlink", delete_file }, { "fgetf", amx_fgetf }, { "fputf", amx_fputf }, + { "build_pathname", amx_build_pathname}, { NULL, NULL } };