The following commit has been merged in the master branch:
commit 2904283eb2cbfaf332ff721cf09a91dfc13cc5e8
Author: Niels Thykier <[email protected]>
Date:   Tue Apr 12 09:33:03 2011 +0200

    Fix the assumption that tmpnam returns absolute paths

diff --git a/lib/Lab.pm b/lib/Lab.pm
index d9d3aea..4725b1d 100644
--- a/lib/Lab.pm
+++ b/lib/Lab.pm
@@ -95,7 +95,11 @@ sub setup {
 
        my $created = 0;
        for (1..10) {
-           $dir = tmpnam(); # [NT] Double check this - would tempdir be 
better? Is it always absolute?
+            my $absdir;
+            $dir = tmpnam(); # Not always absolute (e.g. if TMPDIR is relative)
+            $absdir = Cwd::realpath($dir);
+            fail("Cannot determine the absolute path of $dir: $!")
+                unless $absdir;
 
            if ($self->setup_force( $dir, $dist )) {
                $created = 1;

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to