mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 10:20:52 +00:00
When creating a new directory, we set the initial size to 1 block. This meant that we were allocating a block up front, but the Inode's internal block list cache was not populated with this block. This broke write_bytes() on a new directory, since it assumed that the block list cache would be up to date if the call to write_bytes() would not change the directory's size. This patch fixes the issue in two ways: First, we cache the initial block list created for new directories. Second, we now repopulate the block list cache in write_bytes() if it is empty when we get there. This is basically just a safety fallback to avoid having this kind of bug in the future.
51 KiB
51 KiB