From 35b4ee5bbe950ecc99326b8d057fdf8df5c019d2 Mon Sep 17 00:00:00 2001 From: antifallobst Date: Sat, 4 Mar 2023 22:27:32 +0100 Subject: [PATCH] fix (VFS): changing nodes size on write --- kernel/src/drivers/fs/vfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/src/drivers/fs/vfs.c b/kernel/src/drivers/fs/vfs.c index 92bbd4b..c20a42b 100644 --- a/kernel/src/drivers/fs/vfs.c +++ b/kernel/src/drivers/fs/vfs.c @@ -229,6 +229,9 @@ void vfs_file_delete(vfs_node_T* file) { } void vfs_file_write(vfs_node_T* file, uint64_t position, uint64_t size, uint8_t* buffer_in) { + // in future this probably isn't a good way to determine the size of a file: + file->size = size; + switch (file->filesystem->type) { case FS_RAMFS: { ramfs_file_write(file, size, buffer_in);