git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Misc fiddling with FAT driver (LFN and ReadDir)
[tpg/acess2.git]
/
Modules
/
Filesystems
/
FAT
/
fat.c
diff --git
a/Modules/Filesystems/FAT/fat.c
b/Modules/Filesystems/FAT/fat.c
index
911b26e
..
381a7ec
100644
(file)
--- a/
Modules/Filesystems/FAT/fat.c
+++ b/
Modules/Filesystems/FAT/fat.c
@@
-912,6
+912,7
@@
char *FAT_int_CreateName(fat_filetable *ft, char *LongFileName)
{
\r
char *ret;
\r
ENTER("pft sLongFileName", ft, LongFileName);
\r
{
\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
#if USE_LFN
\r
if(LongFileName && LongFileName[0] != '\0')
\r
{
\r
@@
-1259,14
+1260,7
@@
char *FAT_ReadDir(tVFS_Node *Node, int ID)
lfn = FAT_int_GetLFN( Node, ID + (lfnInfo->id & 0x3F) );
\r
\r
// Bit 6 indicates the start of an entry
\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
\r
a = (lfnInfo->id & 0x3F) * 13;
\r
\r
@@
-1292,11
+1286,16
@@
char *FAT_ReadDir(tVFS_Node *Node, int ID)
LEAVE('p', VFS_SKIP);
\r
return VFS_SKIP;
\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
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
\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
UCC
git Repository :: git.ucc.asn.au