Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-YouTube-Download CPAN distribution.

Report information
The Basics
Id: 79931
Status: resolved
Priority: 0/
Queue: WWW-YouTube-Download

People
Owner: Nobody in particular
Requestors: HMBRAND [...] cpan.org
Cc:
AdminCc:

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



Subject: Don't leave failed empty files
--- youtube-download.org 2012-09-30 11:25:14.928707309 +0200 +++ youtube-download 2012-09-30 11:26:16.858703905 +0200 @@ -63,7 +63,10 @@ main: { overwrite => $overwrite, }); }; - throw("[$meta_data->{video_id}] $@") if $@; + if ($@) { + -e $filename && !-s $filename and unlink $filename; + throw("[$meta_data->{video_id}] $@"); + } chatty(colored ['green'], 'Download successfully!'); Time::HiRes::sleep($interval) if @ARGV;
Thanks, fixed it! On 2012-9月-30 日 05:28:41, HMBRAND wrote: Show quoted text
> --- youtube-download.org 2012-09-30 11:25:14.928707309 +0200 > +++ youtube-download 2012-09-30 11:26:16.858703905 +0200 > @@ -63,7 +63,10 @@ main: { > overwrite => $overwrite, > }); > }; > - throw("[$meta_data->{video_id}] $@") if $@; > + if ($@) { > + -e $filename && !-s $filename and unlink $filename; > + throw("[$meta_data->{video_id}] $@"); > + } > chatty(colored ['green'], 'Download successfully!'); > > Time::HiRes::sleep($interval) if @ARGV;