From: Ian Beckwith Date: Sun, 10 Oct 2010 23:11:07 +0000 (+0100) Subject: sort_elements: fix dropping parents X-Git-Tag: debian/1.0-1~111 X-Git-Url: http://erislabs.net/gitweb/?p=id3fs.git;a=commitdiff_plain;h=c55bea2400943794358f56ce12457a23971b055b sort_elements: fix dropping parents --- diff --git a/lib/ID3FS/Path.pm b/lib/ID3FS/Path.pm index 9078720..0559463 100644 --- a/lib/ID3FS/Path.pm +++ b/lib/ID3FS/Path.pm @@ -361,7 +361,7 @@ sub sort_elements if(ref($thing) eq "ID3FS::PathElement::Tag") { # Handle tag values by dropping parent - if(@input && ref($input[$#input]) eq "ID3FS::PathElement::Tag") + if(@input && ref($input[0]) eq "ID3FS::PathElement::Tag") { $thing=shift @input; } @@ -382,7 +382,7 @@ sub sort_elements { push(@output, pop(@opstack)); } -# print "STACK: ", join(', ', map { $_->{name}; } @output), "\n"; +# print "STACK: ", join(', ', map { $_->{name}; } @output), "\n"; return @output; }