File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
boot/freeldr/freeldr/lib/fs Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -525,19 +525,15 @@ static BOOLEAN NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry)
525525 if (strlen (FileName ) != EntryFileNameLength )
526526 return FALSE;
527527
528- /* Do case-sensitive compares for Posix file names. */
529- if (IndexEntry -> FileName .FileNameType == NTFS_FILE_NAME_POSIX )
530- {
531- for (i = 0 ; i < EntryFileNameLength ; i ++ )
532- if (EntryFileName [i ] != FileName [i ])
533- return FALSE;
534- }
535- else
536- {
537- for (i = 0 ; i < EntryFileNameLength ; i ++ )
538- if (tolower (EntryFileName [i ]) != tolower (FileName [i ]))
539- return FALSE;
540- }
528+ /* Always do case-insensitive compares for file names.
529+ * Why is this necessary?
530+ * Because when modifying an Windows ntfs partition formatted with Windows itself
531+ * on Linux the ntldr/bootmgr will boot normally ignoring the case of the path
532+ * so let's do the same.
533+ */
534+ for (i = 0 ; i < EntryFileNameLength ; i ++ )
535+ if (tolower (EntryFileName [i ]) != tolower (FileName [i ]))
536+ return FALSE;
541537
542538 return TRUE;
543539}
You can’t perform that action at this time.
0 commit comments