From c55bea2400943794358f56ce12457a23971b055b Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Mon, 11 Oct 2010 00:11:07 +0100 Subject: [PATCH] sort_elements: fix dropping parents --- lib/ID3FS/Path.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.11.0