From acda419a2d773ea890052a16ee66b4872f941fbb Mon Sep 17 00:00:00 2001 From: Far Date: Thu, 17 Jun 2021 19:32:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86LOSCFG=5FFS?= =?UTF-8?q?=5FFAT=5FVIRTUAL=5FPARTITION=E5=AE=8F=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BD=9C=E7=94=A8=E5=9F=9F=E5=BC=95=E8=B5=B7?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在init_cluster函数中,若未打开LOSCFG_FS_FAT_VIRTUAL_PARTITION会导致循环初始化 簇时,未调用sync_window函数,进而导致创建的文件夹未能正确置零。 Close #I3W1IW Signed-off-by: Far --- fs/fat/os_adapt/fatfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fat/os_adapt/fatfs.c b/fs/fat/os_adapt/fatfs.c index f60fc1b6..51e9a747 100644 --- a/fs/fat/os_adapt/fatfs.c +++ b/fs/fat/os_adapt/fatfs.c @@ -294,12 +294,12 @@ static FRESULT init_cluster(DIR *dp_new, FATFS *fs, int type, const char *target #else PARENTFS(fs)->winsect = sect++; PARENTFS(fs)->wflag = 1; +#endif result = sync_window(fs); if (result != FR_OK) { remove_chain(&(dp_new->obj), *clust, 0); return result; } -#endif if (type == AM_LNK) { /* No need to clean the rest sectors of the cluster for symlink */ break;