{\r
char *ret;\r
ENTER("pft sLongFileName", ft, LongFileName);\r
+ //Log_Debug("FAT", "FAT_int_CreateName(ft=%p, LongFileName=%p'%s')", ft, LongFileName);\r
#if USE_LFN\r
if(LongFileName && LongFileName[0] != '\0')\r
{ \r
lfn = FAT_int_GetLFN( Node, ID + (lfnInfo->id & 0x3F) );\r
\r
// Bit 6 indicates the start of an entry\r
- if(lfnInfo->id & 0x40) {\r
- //Log_Debug("FAT", "lfn = %p", lfn);\r
- //Heap_Validate();\r
- //Log_Debug("FAT", "Clearing LFN");\r
- memset(lfn, 0, 256);\r
- //Heap_Validate();\r
- //Log_Debug("FAT", "Check Passed");\r
- }\r
+ if(lfnInfo->id & 0x40) memset(lfn, 0, 256);\r
\r
a = (lfnInfo->id & 0x3F) * 13;\r
\r
LEAVE('p', VFS_SKIP);\r
return VFS_SKIP;\r
}\r
- // Ignore . and ..\r
- if(fileinfo[a].name[0] == '.') {\r
+ // Ignore .\r
+ if(fileinfo[a].name[0] == '.' && fileinfo[a].name[1] == ' ') {\r
LEAVE('p', VFS_SKIP);\r
return VFS_SKIP;\r
- } \r
+ }\r
+ // and ..\r
+ if(fileinfo[a].name[0] == '.' && fileinfo[a].name[1] == '.' && fileinfo[a].name[2] == ' ') {\r
+ LEAVE('p', VFS_SKIP);\r
+ return VFS_SKIP;\r
+ }\r
\r
LOG("name='%c%c%c%c%c%c%c%c.%c%c%c'",\r
fileinfo[a].name[0], fileinfo[a].name[1], fileinfo[a].name[2], fileinfo[a].name[3],\r