Update src/common/fs_file.cpp

Co-authored-by: GPUCode <47210458+GPUCode@users.noreply.github.com>
This commit is contained in:
georgemoralis 2023-11-08 07:57:13 +02:00 committed by GitHub
parent 4bd4d2ff53
commit d4ac82eef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -60,11 +60,10 @@ u64 File::tell() const {
std::vector<DirEntry> File::getDirectoryEntries(const std::string& path) {
std::string curpath = path;
if (!curpath.ends_with("/"))
{
if (!curpath.ends_with("/")) {
curpath = std::string(curpath + "/");
}
std::vector < DirEntry> files;
std::vector<DirEntry> files;
for (const auto& entry : std::filesystem::directory_iterator(curpath)) {
if (std::filesystem::is_regular_file( entry.path().string())) {