if(Cluster) *Cluster = cluster;\r
}\r
\r
+ LOG("cluster = %08x", cluster);\r
+ \r
// Bounds Checking (Used to spot corruption)\r
if(cluster > disk->ClusterCount + 2)\r
{\r
return 1;\r
}\r
\r
+ LOG("addr = 0x%llx", addr);\r
// Read Sector\r
if(VFS_ReadAt(disk->fileHandle, addr, 512, Buffer) != 512)\r
{\r
\r
if(FAT_int_ReadDirSector(Node, ID/16, fileinfo))\r
{\r
+ LOG("End of chain, end of dir");\r
LEAVE('n');\r
return NULL;\r
}\r
// Offset in sector\r
a = ID % 16;\r
\r
- LOG("a = %i", a);\r
- \r
- LOG("name[0] = 0x%x", (Uint8)fileinfo[a].name[0]);\r
+ LOG("fileinfo[%i].name[0] = 0x%x", a, (Uint8)fileinfo[a].name[0]);\r
\r
// Check if this is the last entry\r
if( fileinfo[a].name[0] == '\0' ) {\r
// Check for empty entry\r
if( (Uint8)fileinfo[a].name[0] == 0xE5 ) {\r
LOG("Empty Entry");\r
- LEAVE('p', VFS_SKIP);\r
- return VFS_SKIP; // Skip\r
+ //LEAVE('p', VFS_SKIP);\r
+ //return VFS_SKIP; // Skip\r
+ LEAVE('n');\r
+ return NULL; // Skip\r
}\r
\r
#if USE_LFN\r