From 25e56c374cb7f6ea3da8b8046764b36caa56ea02 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Thu, 29 Jun 2017 11:42:27 +0000 Subject: glob_expand: Special-case "." as dir Signed-off-by: Niels Thykier --- Debian/Debhelper/Dh_Lib.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index b659e420..07c979f5 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -967,7 +967,9 @@ sub glob_expand { for my $pattern (@patterns) { my @m; for my $dir (@dirs) { - @m = bsd_glob("$dir/$pattern", GLOB_CSH & ~(GLOB_NOMAGIC|GLOB_TILDE)); + # Special-case "." because it looks nicer that way. + my $full_pattern = ($dir eq '.' ? $pattern : "$dir/$pattern"); + @m = bsd_glob($full_pattern, GLOB_CSH & ~(GLOB_NOMAGIC|GLOB_TILDE)); last if @m;# > 1 or (@m and (-l $m[0] or -e _)); } if (not @m) { -- cgit v1.2.3