[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: L::Path: Allow only string arguments to resolve_path



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit cbd7171d73fcbc5dab587c0a86ac28d7abbd66c5
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Sep 30 19:29:37 2014 +0200

    L::Path: Allow only string arguments to resolve_path
    
    This is to avoid passing L::Path objects to resolve_path, which will
    not produce the desired result.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 lib/Lintian/Path.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/Lintian/Path.pm b/lib/Lintian/Path.pm
index c4ddf4f..0f54d06 100644
--- a/lib/Lintian/Path.pm
+++ b/lib/Lintian/Path.pm
@@ -583,6 +583,10 @@ sub resolve_path {
     my (@queue, %traversed_links, $had_trailing_slash);
     my $fs_info = $self->{'_fs_info'};
 
+    if (defined($path_str) and ref($path_str) ne q{}) {
+        croak('resolve_path only accepts string arguments');
+    }
+
     $path_str //= '';
 
     if (not $self->is_dir and not $self->is_symlink) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: