[*] autism

This commit is contained in:
Reece Wilson 2023-07-29 09:58:02 +01:00
parent 5e94be7487
commit a79caa707f
2 changed files with 16 additions and 4 deletions

View File

@ -32,6 +32,12 @@ namespace Aurora::IO::FS
FILETIME modified;
FILETIME access;
if (path.empty())
{
SysPushErrorArg("Empty path provided");
return false;
}
auto pathex = NormalizePathRet(path);
if (pathex.empty())
{
@ -56,11 +62,11 @@ namespace Aurora::IO::FS
{
if (!AuFS::FileExists(pathex))
{
SysPushErrorIO("Missing file: {}", path);
SysPushErrorResourceMissing("Missing file: {}", path);
return false;
}
SysPushErrorIO("Couoldn't open a handle for: {}", path);
SysPushErrorIO("Couldn't open a handle for: {}", path);
return false;
}

View File

@ -16,6 +16,12 @@ namespace Aurora::IO::FS
AuList<AuString> names;
WIN32_FIND_STREAM_DATA data;
if (path.empty())
{
SysPushErrorArg("Empty path provided");
return {};
}
auto pathex = NormalizePathRet(path);
if (pathex.empty())
{
@ -42,11 +48,11 @@ namespace Aurora::IO::FS
{
if (!AuFS::FileExists(pathex))
{
SysPushErrorIO("Missing file: {}", path);
SysPushErrorResourceMissing("Missing file: {}", path);
return {};
}
SysPushErrorIO("Couoldn't open a handle for: {}", path);
SysPushErrorIO("Couldn't open a handle for: {}", path);
return {};
}