1
0
Fork 0
forked from len0rd/rockbox

Bug fixes: 1) add_dir_entry() would update end-of-dir marker even when not supposed to. 2) create_dos_name() didn't treat spaces correctly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2854 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-11-18 14:55:05 +00:00
parent eee2c01697
commit 0a488fb155

View file

@ -841,7 +841,6 @@ static int add_dir_entry(struct fat_dir* dir,
entries_found = entries_needed; entries_found = entries_needed;
LDEBUGF("Found last entry %d\n", LDEBUGF("Found last entry %d\n",
sector * DIR_ENTRIES_PER_SECTOR + i); sector * DIR_ENTRIES_PER_SECTOR + i);
last = true;
done = true; done = true;
break; break;
@ -873,7 +872,9 @@ static int add_dir_entry(struct fat_dir* dir,
/* if we're not extending the dir, /* if we're not extending the dir,
we must go back to first free entry */ we must go back to first free entry */
if (!last) if (done)
last = true;
else
firstentry -= (entries_needed - 1); firstentry -= (entries_needed - 1);
} }
} }
@ -951,6 +952,7 @@ unsigned char char2dos(unsigned char c)
case 0xe5: /* Special kanji character */ case 0xe5: /* Special kanji character */
c = 0x05; c = 0x05;
break; break;
case 0x20:
case 0x22: case 0x22:
case 0x2a: case 0x2a:
case 0x2b: case 0x2b: