[Lxr-commits] CVS: lxr/lib/LXR/Files BK.pm,1.1.2.11,1.1.2.12
Brought to you by:
ajlittoz
From: Malcolm B. <mb...@us...> - 2005-02-21 08:25:24
|
Update of /cvsroot/lxr/lxr/lib/LXR/Files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv600/lib/LXR/Files Modified Files: Tag: bk-dev-branch BK.pm Log Message: Sort the files & directories returned from getdir() Index: BK.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/Attic/BK.pm,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -d -r1.1.2.11 -r1.1.2.12 --- BK.pm 20 Feb 2005 23:44:55 -0000 1.1.2.11 +++ BK.pm 21 Feb 2005 08:25:08 -0000 1.1.2.12 @@ -55,7 +55,10 @@ $self->fill_cache($release); $pathname = canonise($pathname); $pathname = File::Spec->rootdir() if $pathname eq ''; - return keys %{ $tree_cache{$release}->{$pathname} }; + my @nodes = keys %{ $tree_cache{$release}->{$pathname} }; + my @dirs = grep m!/$!, @nodes; + my @files = grep !m!/$!, @nodes; + return (sort(@dirs), sort(@files)); } sub getfile { |