From e4db980830bcbcb7b78e01d681e0a484fdf5d67b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Fri, 8 Apr 2011 18:19:17 +0200 Subject: [PATCH] Translated the junctions to lower case when ignore_case is set When ignore_case is set, the file names are returned lower-case in readdir() in order to make file name completions possible. This patch does the same for junction points to avoid directory locks when used with non-matching names. --- libntfs-3g/reparse.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libntfs-3g/reparse.c b/libntfs-3g/reparse.c index 0f6360e1..05490bf4 100644 --- a/libntfs-3g/reparse.c +++ b/libntfs-3g/reparse.c @@ -200,8 +200,13 @@ static u64 ntfs_fix_file_name(ntfs_inode *dir_ni, ntfschar *uname, */ lemref = entry->indexed_file; mref = le64_to_cpu(lemref); - for (i=0; ifile_name_length; i++) - uname[i] = found->file_name[i]; + if (NVolCaseSensitive(vol) || !vol->locase) { + for (i=0; ifile_name_length; i++) + uname[i] = found->file_name[i]; + } else { + for (i=0; ifile_name_length; i++) + uname[i] = vol->locase[found->file_name[i]]; + } } } ntfs_index_ctx_put(icx);