From 6af9f8a622dcd143c48a2e6491ff587843f6bcc2 Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Sun, 3 Oct 2010 18:18:14 +0100 Subject: [PATCH] constraints_tag_list: handle dangling tag with unspecified value --- lib/ID3FS/DB.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ID3FS/DB.pm b/lib/ID3FS/DB.pm index 19015fd..fd0b7a7 100644 --- a/lib/ID3FS/DB.pm +++ b/lib/ID3FS/DB.pm @@ -416,7 +416,7 @@ sub constraints_tag_list my @tags_vals=(); for my $constraint (@constraints) { - print ref($constraint), $constraint->{name}, "\n"; + print ref($constraint), ": ", $constraint->{name}, "\n"; if(ref($constraint) eq "ID3FS::PathElement::Tag") { if(defined($lasttag)) @@ -437,6 +437,11 @@ sub constraints_tag_list } } } + # handle dangling tag with unspecified value + if(defined($lasttag)) + { + push(@tags, $lasttag); + } unless($self->{postgres}) { @tags=map{ "\"$_\""; } @tags; -- 2.11.0