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 {