diff options
author | Nigel Taylor <njtaylor0101@gmail.com> | 2013-04-04 15:47:28 +0100 |
---|---|---|
committer | Nigel Taylor <njtaylor0101@gmail.com> | 2013-04-04 15:47:28 +0100 |
commit | 660a426ee16e45570485b8b344216b4fae9fbb24 (patch) | |
tree | 319236e19c98315ba0dedb967d5e7ce15bcf3079 | |
parent | 04541fbccba1c1ca15e639cfa7ff9a47776293e1 (diff) | |
download | get-flash-videos-660a426ee16e45570485b8b344216b4fae9fbb24.tar.gz |
If plugin exists but fails to open display error message ref issue 403
-rwxr-xr-x | get_flash_videos | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/get_flash_videos b/get_flash_videos index befae4a..6f70dcf 100755 --- a/get_flash_videos +++ b/get_flash_videos @@ -695,8 +695,11 @@ sub plugin_loader { debug "Trying to open plugin $plugin_dir/$plugin_name"; - if (open my $plugin_fh, '<', "$plugin_dir/$plugin_name") { - return $plugin_fh; # Perl then reads the plugin from the FH + if (-s "$plugin_dir/$plugin_name") { + if (open my $plugin_fh, '<', "$plugin_dir/$plugin_name") { + return $plugin_fh; # Perl then reads the plugin from the FH + } + info "Failed to open plugin $plugin_dir/$plugin_name $!"; } } |