From: | "Pacho Ramos (pacho)" <pacho@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in app-admin/durep/files: durep-0.9-dirhandle.patch |
Date: | Sat, 03 Mar 2012 16:08:00 |
Message-Id: | 20120303160751.31E6D2004C@flycatcher.gentoo.org |
1 | pacho 12/03/03 16:07:51 |
2 | |
3 | Added: durep-0.9-dirhandle.patch |
4 | Log: |
5 | Fix dirhandle errors, bug #343913 by Jesús Guerrero and Ian Delaney. |
6 | |
7 | (Portage version: 2.1.10.49/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 app-admin/durep/files/durep-0.9-dirhandle.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/durep/files/durep-0.9-dirhandle.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/durep/files/durep-0.9-dirhandle.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: durep-0.9-dirhandle.patch |
16 | =================================================================== |
17 | --- durep 2007-09-08 11:44:05.000000000 -0500 |
18 | +++ durep.new 2008-12-15 10:04:14.907825184 -0600 |
19 | @@ -175,6 +175,7 @@ |
20 | my $coalesced_size = 0; |
21 | my $node = {}; |
22 | my $temp; |
23 | + my $dirhandle; |
24 | |
25 | $node->{ID} = $next_id++; |
26 | if(defined $parent) { |
27 | @@ -196,9 +197,9 @@ |
28 | |
29 | $node->{TYPE} &= $TYPE_COLLAPSED unless $store; |
30 | |
31 | - opendir(DIR, $dir) or warn "Unable to open dir '$dir': $!\n" and return $node; |
32 | + opendir($dirhandle, $dir) or warn "Unable to open dir '$dir': $!\n" and return $node; |
33 | |
34 | - foreach(readdir(DIR)) { |
35 | + foreach(readdir($dirhandle)) { |
36 | @stats = lstat "$dir/$_" or warn "Unable to lstat '$dir/$_': $!\n" and next; |
37 | |
38 | $node->{MTIME} = $stats[9] if($_ eq "."); |
39 | @@ -247,7 +248,7 @@ |
40 | $file_count++; |
41 | $node->{FCOUNT}++; |
42 | } |
43 | - closedir(DIR); |
44 | + closedir($dirhandle); |
45 | |
46 | if($coalesced_count) { |
47 | if($store) { |