diff --git a/kernel/fatfs.c b/kernel/fatfs.c index 411e2d26..ec89418f 100644 --- a/kernel/fatfs.c +++ b/kernel/fatfs.c @@ -1028,6 +1028,12 @@ COUNT map_cluster(REG f_node_ptr fnp, COUNT mode) fnp->f_cluster = cluster; fnp->f_cluster_offset++; + fnp->f_dir.dir_size = + ((ULONG)fnp->f_cluster + * (ULONG)fnp->f_dpb->dpb_secsize) + << + fnp->f_dpb->dpb_shftcnt; + merge_file_changes(fnp, FALSE); } #ifdef DISPLAY_GETBLOCK