asset.cpp: Also call check_dir for drivers

The driver category is used to determine which directory the driver
should be extracted to, so it must be sanitised.
This commit is contained in:
Xavier Del Campo Romero 2025-01-22 16:49:41 +01:00
parent 139b2ac913
commit afa21d25d5
Signed by: xavi
GPG key ID: 84FF3612A9BF43F2

View file

@ -192,10 +192,19 @@ int Asset::parse(const cJSON *c)
GfLogError("check_dir directory failed\n");
return -1;
}
else if (type == Asset::track && check_dir(category))
switch (type)
{
GfLogError("check_dir category failed\n");
return -1;
case Asset::car:
break;
case Asset::driver:
case Asset::track:
if (check_dir(category))
{
GfLogError("check_dir category failed\n");
return -1;
}
}
this->size = sizeull;