From 8ef69429d84053c547cb8b26511d3e78fe230d53 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Wed, 29 Jan 2020 07:44:44 +0100 Subject: [PATCH] Add early out to pkg_install --- rpcs3/Crypto/unpkg.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rpcs3/Crypto/unpkg.cpp b/rpcs3/Crypto/unpkg.cpp index 668d2bdcd..4666e2d5d 100644 --- a/rpcs3/Crypto/unpkg.cpp +++ b/rpcs3/Crypto/unpkg.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "utils.h" #include "aes.h" #include "sha1.h" @@ -10,6 +10,12 @@ bool pkg_install(const std::string& path, atomic_t& sync) { + if (!fs::is_file(path)) + { + LOG_ERROR(LOADER, "PKG file not found!"); + return false; + } + const std::size_t BUF_SIZE = 8192 * 1024; // 8 MB std::vector filelist;