Skip to content

Commit

Permalink
Fix Unpacker msgbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
tx00100xt committed Sep 24, 2023
1 parent a3d9315 commit 68a70d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Classes/Unpacker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ void Unpacker::Extract(QString strFileName, QString strPath, int iDoExtract, int
if (chrFilename != NULL && strcmp(chrFilename, "-") == 0)
chrFilename = NULL;
if ((r = archive_read_open_filename(a, chrFilename, 10240))) {
MsgBox(ERROR, QString::fromLocal8Bit(archive_error_string(a)));
MsgBox(ERR, QString::fromLocal8Bit(archive_error_string(a)));
return;
}
for (;;) {
r = archive_read_next_header(a, &entry);
if (r == ARCHIVE_EOF)
break;
if (r != ARCHIVE_OK) {
MsgBox(ERROR, QString::fromLocal8Bit(archive_error_string(a)));
MsgBox(ERR, QString::fromLocal8Bit(archive_error_string(a)));
return;
}

Expand All @@ -81,7 +81,7 @@ void Unpacker::Extract(QString strFileName, QString strPath, int iDoExtract, int
archive_entry_set_pathname(entry, (const char*)chrPathWithFile);
r = archive_write_header(ext, entry);
if (r != ARCHIVE_OK) {
MsgBox(ERROR, QString::fromLocal8Bit(archive_error_string(a)));
MsgBox(ERR, QString::fromLocal8Bit(archive_error_string(a)));
}
else {
r = CopyData(a, ext);
Expand Down Expand Up @@ -110,12 +110,12 @@ int Unpacker::CopyData(struct archive *ar, struct archive *aw)
if (r == ARCHIVE_EOF)
return (ARCHIVE_OK);
if (r != ARCHIVE_OK) {
MsgBox(ERROR, QString::fromLocal8Bit(archive_error_string(ar)));
MsgBox(ERR, QString::fromLocal8Bit(archive_error_string(ar)));
return (r);
}
r = archive_write_data_block(aw, buff, size, offset);
if (r != ARCHIVE_OK) {
MsgBox(ERROR, QString::fromLocal8Bit(archive_error_string(ar)));
MsgBox(ERR, QString::fromLocal8Bit(archive_error_string(ar)));
return (r);
}
}
Expand Down

0 comments on commit 68a70d9

Please sign in to comment.