From f8de613801fee6f4d1589e63abd40bce30e6c2aa Mon Sep 17 00:00:00 2001 From: jpandre Date: Sat, 7 Nov 2009 08:28:43 +0000 Subject: [PATCH] Fixed identifying correct case in junction points --- libntfs-3g/reparse.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libntfs-3g/reparse.c b/libntfs-3g/reparse.c index 115429ed..6ac96c6e 100644 --- a/libntfs-3g/reparse.c +++ b/libntfs-3g/reparse.c @@ -167,9 +167,12 @@ static u64 ntfs_fix_file_name(ntfs_inode *dir_ni, ntfschar *uname, cpuchar = le16_to_cpu(uname[i]); /* * We need upper or lower value, whichever is smaller, - * here we assume upper is always smaller + * but we can only convert to upper case, so we + * will fail when searching for an upper case char + * whose lower case is smaller (such as umlauted Y) */ - if (cpuchar < vol->upcase_len) + if ((cpuchar < vol->upcase_len) + && (le16_to_cpu(vol->upcase[cpuchar]) < cpuchar)) find.attr.file_name[i] = vol->upcase[cpuchar]; else find.attr.file_name[i] = uname[i];