fix: 修复了LOSCFG_FS_FAT_VIRTUAL_PARTITION宏开关错误作用域引起的功能错误
在init_cluster函数中,若未打开LOSCFG_FS_FAT_VIRTUAL_PARTITION会导致循环初始化 簇时,未调用sync_window函数,进而导致创建的文件夹未能正确置零。 Close #I3W1IW Signed-off-by: Far <yesiyuan2@huawei.com>
This commit is contained in:
parent
dca42b9ef6
commit
acda419a2d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue