mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Fixed setting DOS names when defined with lower-case chars
This commit is contained in:
parent
5aa84db792
commit
82b00364a8
@ -1406,16 +1406,18 @@ BOOL ntfs_collapsible_chars(ntfs_volume *vol,
|
||||
{
|
||||
BOOL collapsible;
|
||||
unsigned int ch;
|
||||
unsigned int cs;
|
||||
int i;
|
||||
|
||||
collapsible = shortlen == longlen;
|
||||
if (collapsible)
|
||||
for (i=0; i<shortlen; i++) {
|
||||
ch = le16_to_cpu(longname[i]);
|
||||
if ((ch >= vol->upcase_len)
|
||||
|| ((shortname[i] != longname[i])
|
||||
&& (shortname[i] != vol->upcase[ch])))
|
||||
collapsible = FALSE;
|
||||
for (i=0; collapsible && (i<shortlen); i++) {
|
||||
ch = le16_to_cpu(longname[i]);
|
||||
cs = le16_to_cpu(shortname[i]);
|
||||
if ((cs != ch)
|
||||
&& ((ch >= vol->upcase_len)
|
||||
|| (cs >= vol->upcase_len)
|
||||
|| (vol->upcase[cs] != vol->upcase[ch])))
|
||||
collapsible = FALSE;
|
||||
}
|
||||
return (collapsible);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user