From 30988eba920a63719232ca9dda55450c3841b9ff Mon Sep 17 00:00:00 2001 From: KYzhang_X Date: Mon, 1 Aug 2022 23:14:50 +0800 Subject: [PATCH] fatfs: fix stat bug --- components/fs/fatfs/wrapper/tos_ff.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/fs/fatfs/wrapper/tos_ff.c b/components/fs/fatfs/wrapper/tos_ff.c index 0c49c4b5..5a7819f4 100644 --- a/components/fs/fatfs/wrapper/tos_ff.c +++ b/components/fs/fatfs/wrapper/tos_ff.c @@ -4397,6 +4397,7 @@ FRESULT tos_f_stat ( /* Get logical drive */ res = find_volume(fs, 0); + dj.obj.fs = fs; if (res == FR_OK) { INIT_NAMBUF(dj.obj.fs); res = follow_path(&dj, path); /* Follow the file path */