Skip to content

Commit 116f10d

Browse files
committed
nancy: slight simplification to find_on_path
1 parent 627255d commit 116f10d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

nancy.in

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main;
33

44
my $version = <<'END';
55
nancy @Version@
6-
(c) 2002-2020 Reuben Thomas <rrt@sc3d.org>
6+
(c) 2002-2021 Reuben Thomas <rrt@sc3d.org>
77
https://github.com/rrthomas/nancy/
88
Distributed under the GNU General Public License version 3, or (at
99
your option) any later version. There is no warranty.
@@ -70,10 +70,6 @@ sub find_on_path {
7070
my ($path, $file, $root) = @_;
7171
my @file = splitdir($file);
7272
my @search = @{$path};
73-
while ($file[0] eq "..") {
74-
shift @file;
75-
pop @search;
76-
}
7773
for (;; pop @search) {
7874
my $thissearch = [@search, @file];
7975
my $obj = catfile($root, @{$thissearch});

0 commit comments

Comments
 (0)