[debhelper-devel] [debhelper] 16/17: glob_expand: Special-case "." as dir
Niels Thykier
nthykier at moszumanska.debian.org
Thu Jun 29 15:49:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 25e56c374cb7f6ea3da8b8046764b36caa56ea02
Author: Niels Thykier <niels at thykier.net>
Date: Thu Jun 29 11:42:27 2017 +0000
glob_expand: Special-case "." as dir
Signed-off-by: Niels Thykier <niels at thykier.net>
---
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 b659e42..07c979f 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) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list