cdrom.eclass: Fix matching of entries with trailing /, bug #618344
authorJames Le Cuirot <chewi@gentoo.org>
Sat, 13 May 2017 15:44:14 +0000 (16:44 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sat, 13 May 2017 15:44:14 +0000 (16:44 +0100)
eclass/cdrom.eclass

index 2270bbe30cff914adafde1ad7e6e17c8dd72fbfe..47e2c6342e06c9f60965faf65050aadf5960b509 100644 (file)
@@ -281,7 +281,7 @@ _cdrom_glob_match() {
                shopt -s extglob nocaseglob nullglob || die
                # The first person to make this work without an eval wins a
                # cookie. It breaks without it when spaces are present.
-               eval "ARRAY=( ${p} )"
+               eval "ARRAY=( ${p%\?()} )"
                echo ${ARRAY[0]}
        )
 }