#5 no test to see if .acidrip was opened

closed-out-of-date
nobody
None
5
2003-01-02
2002-12-29
No

I got the following error..

readline() on closed filehandle FILE at
/usr/lib/perl5/site_perl/5.8.0/AcidRip/acidrip.pm line 308.

I have devised the following patch to get rid of that
error...

The below patch also includes the regexp issue for the
display to update and removes the arse at the front of
the filename (that is another bug tho)

[tommy@cookies AcidRip]$ diff acidrip.pm orig.acidrip.pm
209c209
< if
(/^Pos:\s*(\d+\.\ds)\s+(\d+)f\s+\(\s*(\d+)%\)\s+(\d+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/)
{
---
> if
(/^Pos:\s*(\d+\[,.]\ds)\s+(\d+)f\s+\(\s*(\d+)%\)\s+(\d+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/)
{244c244
< 'directory'
=> '',
---
> 'directory'
=> 'arse',
299,303c299,301
< open (CONFIGFILE, '>', "$ENV{HOME}/.acidrip")
|| print "Can't open config file for writing!\n";
< if ($_) {
< foreach my $key (@save) {if
($settings->{$key} ne '') {print CONFIGFILE "$key =
$settings->{$key}\n"}}
< close CONFIGFILE;
< }
---
> open (FILE, '>', "$ENV{HOME}/.acidrip") ||
print "Can't open config file for writing!\n";
> foreach my $key (@save) {if ($settings->{$key}
ne '') {print FILE "$key = $settings->{$key}\n"}}
> close FILE;
309,313c307,309
< open (CONFIGFILE, "$ENV{HOME}/.acidrip") ||
print "no configuration file found, nevermind.\n";
< if ($_) {
< while(<CONFIGFILE>) {if
($_=~/(\w+)\s=\s(.+)/) { $settings->{$1}=$2 }}
< close CONFIGFILE;
< }
---
> open (FILE, "$ENV{HOME}/.acidrip") || print
"no configuration file found, nevermind.\n";
> while(<FILE>) {if ($_=~/(\w+)\s=\s(.+)/) {
$settings->{$1}=$2 }}
> close FILE;
[tommy@cookies AcidRip]$

Discussion

  • Anonymous - 2002-12-29

    acidrip.pm patch to enable the display and fix the config file section

     
  • Anonymous - 2002-12-29

    Logged In: YES
    user_id=644478

    *** NIX that last patch.. it doesnt try to load config
    options at all, but it certainly did get rid of the error :)

    This patch is correct

     
  • Chris Phillips

    Chris Phillips - 2003-01-02
    • status: open --> open-out-of-date
     
  • Chris Phillips

    Chris Phillips - 2003-01-02
    • status: open-out-of-date --> closed-out-of-date
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks