mirror of
				https://github.com/JezuzLizard/T4SP-Server-Plugin.git
				synced 2025-10-31 01:36:57 +00:00 
			
		
		
		
	update
This commit is contained in:
		| @@ -404,14 +404,7 @@ namespace fileio | ||||
|  | ||||
| 			gsc::function::add("fs_listfiles", []() | ||||
| 				{ | ||||
| 					std::string dir = game::Scr_GetString(0, game::SCRIPTINSTANCE_SERVER); | ||||
|  | ||||
| 					if (dir.ends_with("\\") || dir.ends_with("/")) | ||||
| 					{ | ||||
| 						dir = dir.substr(0, dir.length() - 1); | ||||
| 					} | ||||
|  | ||||
| 					auto fpath = build_base_path(dir); | ||||
| 					auto fpath = build_base_path(game::Scr_GetString(0, game::SCRIPTINSTANCE_SERVER)); | ||||
|  | ||||
| 					int numfiles; | ||||
| 					auto* files = game::FS_ListFiles(fpath.c_str(), "", game::FS_LIST_ALL, &numfiles); | ||||
| @@ -419,7 +412,7 @@ namespace fileio | ||||
| 					game::Scr_MakeArray(game::SCRIPTINSTANCE_SERVER); | ||||
| 					for (int i = 0; i < numfiles; i++) | ||||
| 					{ | ||||
| 						game::Scr_AddString(game::SCRIPTINSTANCE_SERVER, (dir + "/" + files[i]).c_str()); | ||||
| 						game::Scr_AddString(game::SCRIPTINSTANCE_SERVER, files[i]); | ||||
| 						game::Scr_AddArray(game::SCRIPTINSTANCE_SERVER); | ||||
| 					} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user