forked from speed-dreams/speed-dreams-code
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:
parent
139b2ac913
commit
afa21d25d5
1 changed files with 12 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue