Skip Menu |

This queue is for tickets about the Net-Flickr-Backup CPAN distribution.

Report information
The Basics
Id: 42898
Status: open
Priority: 0/
Queue: Net-Flickr-Backup

People
Owner: Nobody in particular
Requestors: rt.cpan.simon [...] arlott.org
Cc: tsibley [...] cpan.org
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.991
Fixed in: (no value)



Subject: Infinite loop if pages=0
The poll loop never exits if the flickr server returns 0 pages (e.g. if there are no recently updated images): if ($current_page == $num_pages) { $poll = 0; } $current_page ++;
I just discovered this problem as well after finding cron-started backup processes littering my server as they looped infinitely. Attached is a very simple one-character patch, please apply it and release a new version. :)
diff --git a/lib/Net/Flickr/Backup.pm b/lib/Net/Flickr/Backup.pm index 0470450..794e408 100644 --- a/lib/Net/Flickr/Backup.pm +++ b/lib/Net/Flickr/Backup.pm @@ -541,7 +541,7 @@ sub backup { } - if ($current_page == $num_pages) { + if ($current_page >= $num_pages) { $poll = 0; }