On Mon, Jun 13, 2005 at 12:20:36AM +0200, Bill Allombert wrote:
> Probably a more robust way to find the name of the directory is in
> order. Given you unpack in an empty tempdirr, you could just use
> readdir to find the name of the directory created.

Here a patch that implement this suggestion.

Cheers,
-- 
Bill. <[EMAIL PROTECTED]>

Imagine a large red swirl here. 


--- /usr/bin/debdiff    2005-03-24 15:33:37.000000000 +0100
+++ /home/bill/bin/debdiff      2005-06-13 17:41:34.000000000 +0200
@@ -378,12 +378,12 @@
        mktmpdirs();
        for my $i (1,2) {
            no strict 'refs';
-           my $cmd = qq(cd ${"dir$i"} && dpkg-source -x $dscs[$i]);
-           ${"sdir$i"} = `$cmd`;
+           system qq(cd ${"dir$i"} && dpkg-source -x $dscs[$i] >/dev/null);
            fatal qq(cd ${"dir$i"} && dpkg-source -x $dscs[$i] failed)
                if $? != 0;
-           ${"sdir$i"} =~ /([^\s]*)$/;
-           ${"sdir$i"} = $1;
+           opendir DIR,${"dir$i"};
+           ${"sdir$i"} = (readdir(DIR))[3];
+           closedir(DIR);
        }
        system ("diff", "-Nru", "$dir1/$sdir1", "$dir2/$sdir2");
     }


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to