diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-12-26 13:27:32 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-12-26 15:52:45 +0000 |
commit | ab9ebfa7172a2d1dcd324a777e74ae45b92f6d1c (patch) | |
tree | a1f04a371283bbbd6d68c1426f4e83804d0feb4a /dgit | |
parent | 5eefe642ec12e897481d5a86e74d71e11cdf1601 (diff) |
include-binaries handling: Tiny refactoring
Hoist the !@bpath check so we can add another statement here with
different behaviour.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -6245,8 +6245,10 @@ END }; $wrong->(f_ "forbidden path component '%s'", $ent) if grep { $_ eq $ent } '', '.', '..'; - $wrong->(f_ "path starts with '%s'", $ent) - if !@bpath && grep { $_ eq $ent } qw(debian .git); + if (!@bpath) { # check first component + $wrong->(f_ "path starts with '%s'", $ent) + if grep { $_ eq $ent } qw(debian .git); + } push @bpath, $ent; $bpath_chk = join '/', @bpath; if (!lstat "$maindir/$bpath_chk") { |