From 2ef7f6fdc3b379d91d2b7cc64f4777ad6932619c Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Tue, 28 Feb 2023 18:11:14 +0200 Subject: [PATCH] fixed wring pkg files twice --- shadPS4/emulator/fileFormat/PKG.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/shadPS4/emulator/fileFormat/PKG.cpp b/shadPS4/emulator/fileFormat/PKG.cpp index e8a88b8e..35010db6 100644 --- a/shadPS4/emulator/fileFormat/PKG.cpp +++ b/shadPS4/emulator/fileFormat/PKG.cpp @@ -87,11 +87,13 @@ bool PKG::extract(const std::string& filepath, const std::string& extractPath, s out.Close(); } - //found an name use it - FsFile out; - out.Open(extractPath + name, fsWrite); - out.Write(pkg + entry.offset, entry.size); - out.Close(); + else + { + FsFile out; + out.Open(extractPath + name, fsWrite); + out.Write(pkg + entry.offset, entry.size); + out.Close(); + } } else {