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:
parent
eee2c01697
commit
0a488fb155
1 changed files with 4 additions and 2 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue