(svn r23719) -Fix [FS#4930]: extraction of music packs failed

This commit is contained in:
rubidium 2012-01-02 21:57:29 +00:00
parent 37b136576d
commit 8371ecc922

View File

@ -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);