mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-10 00:11:31 +00:00
(svn r23719) -Fix [FS#4930]: extraction of music packs failed
This commit is contained in:
parent
37b136576d
commit
8371ecc922
@ -544,11 +544,6 @@ void ClientNetworkContentSocketHandler::AfterDownload()
|
||||
if (GunzipFile(this->curInfo)) {
|
||||
unlink(GetFullFilename(this->curInfo, true));
|
||||
|
||||
if (this->curInfo->type == CONTENT_TYPE_BASE_MUSIC) {
|
||||
/* Music can't be in a tar. So extract the tar! */
|
||||
ExtractTar(GetFullFilename(this->curInfo, false), BASESET_DIR);
|
||||
unlink(GetFullFilename(this->curInfo, false));
|
||||
} else {
|
||||
Subdirectory sd = NO_DIRECTORY;
|
||||
switch (this->curInfo->type) {
|
||||
case CONTENT_TYPE_AI:
|
||||
@ -587,6 +582,11 @@ void ClientNetworkContentSocketHandler::AfterDownload()
|
||||
|
||||
TarScanner ts;
|
||||
ts.AddFile(sd, GetFullFilename(this->curInfo, false));
|
||||
|
||||
if (this->curInfo->type == CONTENT_TYPE_BASE_MUSIC) {
|
||||
/* Music can't be in a tar. So extract the tar! */
|
||||
ExtractTar(GetFullFilename(this->curInfo, false), BASESET_DIR);
|
||||
unlink(GetFullFilename(this->curInfo, false));
|
||||
}
|
||||
|
||||
this->OnDownloadComplete(this->curInfo->id);
|
||||
|
Loading…
Reference in New Issue
Block a user