From aa78f5c4e68655625080f6df9f809531dc8ca3a2 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 18 May 2012 12:51:02 +0200 Subject: [PATCH] * grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Mark plain ISO9660 names as case-insensitive, lowercase it and remove trailing dot. --- ChangeLog | 5 +++++ grub-core/fs/iso9660.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9c0079da1..7252ebf43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-18 Vladimir Serbinenko + + * grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Mark plain + ISO9660 names as case-insensitive, lowercase it and remove trailing dot. + 2012-05-17 Vladimir Serbinenko * grub-core/fs/jfs.c (grub_jfs_data): New field caseins. diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c index 318d07edb..819a22b78 100644 --- a/grub-core/fs/iso9660.c +++ b/grub-core/fs/iso9660.c @@ -736,10 +736,17 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir, from the iso9660 filesystem. */ if (!dir->data->joliet && !filename) { + char *ptr; name[dirent.namelen] = '\0'; filename = grub_strrchr (name, ';'); if (filename) *filename = '\0'; + /* ISO9660 names are not case-preserving. */ + type |= GRUB_FSHELP_CASE_INSENSITIVE; + for (ptr = name; *ptr; ptr++) + *ptr = grub_tolower (*ptr); + if (ptr != name && *(ptr - 1) == '.') + *(ptr - 1) = 0; filename = name; }