From 3d71e5d111c3b69065aa82f92fdb2ed65f9f6723 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 21 Dec 2022 08:02:19 +0300 Subject: [PATCH] filesystem: dir: fix merging existing cache with new directory entries --- filesystem/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filesystem/dir.c b/filesystem/dir.c index a3cde48f..394eae79 100644 --- a/filesystem/dir.c +++ b/filesystem/dir.c @@ -164,8 +164,8 @@ static void FS_MergeDirEntries( dir_t *dir, const stringlist_t *list ) } // found directory, move all entries - temp.entries[j].numentries = dir->entries[j].numentries; - temp.entries[j].entries = dir->entries[j].entries; + temp.entries[j].numentries = dir->entries[i].numentries; + temp.entries[j].entries = dir->entries[i].entries; } // now we can free old tree and replace it with temporary