}\r
}\r
\r
- Instance->Root->DirReadNext = FVFS_GET_FIRST_FILE_INFO (Instance);\r
+ Instance->Root->DirReadNext = NULL;\r
+ if (!IsListEmpty (&Instance->FileInfoHead)) {\r
+ Instance->Root->DirReadNext = FVFS_GET_FIRST_FILE_INFO (Instance);\r
+ }\r
+\r
*RootFile = &Instance->Root->FileProtocol;\r
return Status;\r
}\r