mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
fix(relinker): normalize input prefix paths
This commit is contained in:
1 parent
fc046e621b
commit
8625b4802b
1 file changed
+5
-1
@@ -10,7 +10,11 @@ namespace Io {
|
||||
std::vector<std::uint8_t> FileReader::ReadPrefix(const std::string& path, const std::size_t size) const {
|
||||
if (size > static_cast<std::size_t>(std::numeric_limits<std::streamsize>::max()))
|
||||
throw Domain::RelinkerException("File prefix is too large: " + path);
|
||||
std::ifstream f(path, std::ios::binary);
|
||||
const auto native = NativePath(path);
|
||||
std::error_code error;
|
||||
if (!std::filesystem::is_regular_file(native, error))
|
||||
throw Domain::RelinkerException("Cannot open file: " + path);
|
||||
std::ifstream f(native, std::ios::binary);
|
||||
if (!f)
|
||||
throw Domain::RelinkerException("Cannot open file: " + path);
|
||||
std::vector<std::uint8_t> buf(size);
|
||||
|
||||
Reference in new issue
Block a user