mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-04-19 13:12:53 +00:00
fix double slashes
This commit is contained in:
parent
7a82be782d
commit
1f0717edef
@ -405,6 +405,12 @@ 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);
|
||||
|
||||
int numfiles;
|
||||
|
Loading…
x
Reference in New Issue
Block a user