1
0
mirror of synced 2024-09-24 11:38:26 +02:00

fix: Auto extractor overwriting existing files

This commit is contained in:
WerWolv 2023-12-12 12:15:32 +01:00
parent f618e634e9
commit 045733d188

View File

@ -8,8 +8,11 @@ namespace hex::plugin::builtin {
void extractBundledFiles() {
for (const auto &romfsPath : romfs::list("auto_extract")) {
for (const auto &imhexPath : fs::getDataPaths()) {
wolv::io::File file(imhexPath / std::fs::relative(romfsPath, "auto_extract"), wolv::io::File::Mode::Create);
const auto path = imhexPath / std::fs::relative(romfsPath, "auto_extract");
if (wolv::io::fs::exists(path))
continue;
wolv::io::File file(path, wolv::io::File::Mode::Create);
if (!file.isValid())
continue;