Skip to content

Commit

Permalink
reset indexes on completion
Browse files Browse the repository at this point in the history
  • Loading branch information
ElBread3 committed Nov 30, 2024
1 parent 1c657f6 commit b30365c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/libraries/kernel/file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,7 @@ static int HandleSeparateUpdateDents(int fd, char* buf, int nbytes, s64* basep)
return dir_entries;
} else {
new_file->dirents = GetDirectoryEntries(new_file->m_host_name);
if (!new_file->is_opened) {
new_file->dirents_index = 0;
}
new_file->dirents_index = 0;
}
new_file->is_opened = true;
descriptor = h->GetFileDescriptor(new_file);
Expand All @@ -602,6 +600,10 @@ static int HandleSeparateUpdateDents(int fd, char* buf, int nbytes, s64* basep)
}

dir_entries = GetDents(descriptor, buf, nbytes, basep);
if (dir_entries == ORBIS_OK && existent_folder) {
existent_folder->dirents_index = 0;
file->dirents_index = 0;
}
}

return dir_entries;
Expand Down

0 comments on commit b30365c

Please sign in to comment.