mirror of
https://github.com/hedge-dev/XenosRecomp.git
synced 2025-10-30 07:12:17 +00:00
Fix Directory Being Opened As File (#8)
Fixed a bug where the directory would be opened as a file. Add a check to avoid this.
This commit is contained in:
parent
f2ae8ef9db
commit
6fd80818d4
1 changed files with 5 additions and 0 deletions
|
|
@ -74,6 +74,11 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
for (auto& file : std::filesystem::directory_iterator(input))
|
for (auto& file : std::filesystem::directory_iterator(input))
|
||||||
{
|
{
|
||||||
|
if (std::filesystem::is_directory(file))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
size_t fileSize = 0;
|
size_t fileSize = 0;
|
||||||
auto fileData = readAllBytes(file.path().string().c_str(), fileSize);
|
auto fileData = readAllBytes(file.path().string().c_str(), fileSize);
|
||||||
bool foundAny = false;
|
bool foundAny = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue