mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Fix extraction directory making
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "extract.hpp"
|
#include "extract.hpp"
|
||||||
|
#include "files.hpp"
|
||||||
#include "scriptUtils.hpp"
|
#include "scriptUtils.hpp"
|
||||||
#include <archive.h>
|
#include <archive.h>
|
||||||
#include <archive_entry.h>
|
#include <archive_entry.h>
|
||||||
@@ -79,12 +80,7 @@ Result extractArchive(const std::string &archivePath, const std::string &wantedF
|
|||||||
if (std::regex_search(entryName, match, std::regex(wantedFile))) {
|
if (std::regex_search(entryName, match, std::regex(wantedFile))) {
|
||||||
extractingFile = outputPath + match.suffix().str();
|
extractingFile = outputPath + match.suffix().str();
|
||||||
|
|
||||||
/* make directories. */
|
makeDirs(outputPath.c_str());
|
||||||
int substrPos = 1;
|
|
||||||
while(extractingFile.find("/", substrPos)) {
|
|
||||||
mkdir(extractingFile.substr(0, substrPos).c_str(), 0777);
|
|
||||||
substrPos = extractingFile.find("/", substrPos) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint sizeLeft = archive_entry_size(entry);
|
uint sizeLeft = archive_entry_size(entry);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user