downloadsmenu.cpp: Ensure parent directories
Some checks failed
/ build (pull_request) Has been cancelled
Some checks failed
/ build (pull_request) Has been cancelled
Cars are downloaded to cars/models/<carname>, and tracks to tracks/<category>/<trackname>. Therefore, downloadsmenu.cpp must ensure cars/models/ and tracks/<category>/ exist before extracting the package.
This commit is contained in:
parent
a61ecdfad4
commit
553f77515d
1 changed files with 2 additions and 1 deletions
|
@ -635,9 +635,10 @@ int DownloadsMenu::save(entry *e, const std::string &path,
|
|||
std::string &error) const
|
||||
{
|
||||
const Asset &a = e->a;
|
||||
std::string dir = a.basedir() + a.path();
|
||||
|
||||
if (check_hash(e, path, error)
|
||||
|| GfDirCreate(a.path().c_str()) != GF_DIR_CREATED
|
||||
|| GfDirCreate(dir.c_str()) != GF_DIR_CREATED
|
||||
|| extract(e, path, error))
|
||||
goto failure;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue