mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
PSF: Don't attempt to load files with size 0
This commit is contained in:
parent
f48589005d
commit
e4fca8274e
2 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "PSF.h"
|
#include "PSF.h"
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
@ -103,7 +103,7 @@ namespace psf
|
||||||
registry result;
|
registry result;
|
||||||
|
|
||||||
// Hack for empty input (TODO)
|
// Hack for empty input (TODO)
|
||||||
if (!stream)
|
if (!stream || !stream.size())
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace
|
||||||
// get the saves matching the supplied prefix
|
// get the saves matching the supplied prefix
|
||||||
for (const auto& entry : fs::dir(base_dir))
|
for (const auto& entry : fs::dir(base_dir))
|
||||||
{
|
{
|
||||||
if (!entry.is_directory)
|
if (!entry.is_directory || entry.name == "." || entry.name == "..")
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@ namespace
|
||||||
|
|
||||||
if (psf.empty())
|
if (psf.empty())
|
||||||
{
|
{
|
||||||
|
LOG_ERROR(LOADER, "Failed to load savedata: %s", base_dir + "/" + entry.name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue