diff options
author | Niels Thykier <niels@thykier.net> | 2017-06-29 11:42:27 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2017-06-29 15:48:34 +0000 |
commit | 25e56c374cb7f6ea3da8b8046764b36caa56ea02 (patch) | |
tree | 90d556668ef4a3e26c4f5f5ccd9bacd467f6787e | |
parent | 3c4a4476ecc57c82a3d9ed8f50046a315bcff999 (diff) | |
download | debhelper-25e56c374cb7f6ea3da8b8046764b36caa56ea02.tar.gz |
glob_expand: Special-case "." as dir
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | Debian/Debhelper/Dh_Lib.pm | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |