Skip Menu |

This queue is for tickets about the MP3-Info CPAN distribution.

Report information
The Basics
Id: 2078
Status: resolved
Priority: 0/
Queue: MP3-Info

People
Owner: cnandor [...] cpan.org
Requestors: cnandor [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 1.02



Subject: remove_mp3tag() broken for non-existing ID3v1 tags
Previously from SF.net: Updating from 0.80 (IIRC) the other day, I noticed that the semantics of remove_mp3tag() have changed drastically and are not consistent with the (current) documentation. Before, remove_mp3tag() returned 1 if a tag was removed and undefined otherwise. Since 0.90, according to the documentation it should be 128 if a tag was removed, - 1 if no tag was removed and undefined otherwise. Unfortunately, in code ("reality" :-)) remove_mp3tag() returns 128 also if no tag was removed (and no error occured). My attached tiny patch (against HEAD) fixes this.
[CNANDOR - Mon Feb 10 23:22:19 2003]: Show quoted text
> Unfortunately, in code ("reality" :-)) remove_mp3tag() returns 128 > also if no tag was removed (and no error occured). My attached > tiny patch (against HEAD) fixes this.
Patch: Index: Info.pm =================================================================== RCS file: /cvsroot/mp3-info/mp3-info/Info.pm,v retrieving revision 1.14 diff -u -r1.14 Info.pm --- Info.pm 27 Feb 2002 03:59:32 -0000 1.14 +++ Info.pm 21 Jan 2003 01:31:19 -0000 @@ -220,8 +220,8 @@ my $tell = tell $fh; if (<$fh> =~ /^TAG/) { truncate $fh, $tell or carp "Can't truncate '$file': $!"; + $return += 128; } - $return += 128; } if ($version eq 2 || $version eq 'ALL') {
Subject: Fixed
Bug is fixed, and included in v1.02. Thanks.