提交 acda419a 编写于 作者: F Far

fix: 修复了LOSCFG_FS_FAT_VIRTUAL_PARTITION宏开关错误作用域引起的功能错误

在init_cluster函数中,若未打开LOSCFG_FS_FAT_VIRTUAL_PARTITION会导致循环初始化
簇时,未调用sync_window函数,进而导致创建的文件夹未能正确置零。

Close #I3W1IW
Signed-off-by: NFar <yesiyuan2@huawei.com>
上级 dca42b9e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册