Extract ROM to new folder next to archive
For example if DS_ROMS.zip had game.nds, the directory structure would be: ├── DS_ROMS │ └── game.nds └── DS_ROMS.zip
This commit is contained in:
parent
8d70d0926c
commit
d6cade25f4
|
@ -87,8 +87,9 @@ QVector<QString> ExtractFileFromArchive(const char* path, const char* wantedFile
|
|||
return QVector<QString> {"Err", archive_error_string(a)};
|
||||
}
|
||||
|
||||
const char* fileToWrite = archive_entry_pathname(entry);
|
||||
std::ofstream(fileToWrite, std::ofstream::binary).write((char*)archiveBuffer.get(), bytesToWrite);
|
||||
QString fileToWrite = QFileInfo(path).absolutePath() + "/" + QFileInfo(dirToWrite).baseName() + "/" + archive_entry_pathname(entry);
|
||||
|
||||
std::ofstream(fileToWrite.toUtf8().constData(), std::ofstream::binary).write((char*)archiveBuffer.get(), bytesToWrite);
|
||||
|
||||
archiveBuffer.reset(nullptr);
|
||||
archive_read_close(a);
|
||||
|
|
Loading…
Reference in New Issue