Solution for "get_iplayer is not writable" error when doing --update on Windows

Shevek shevek at shevek.co.uk
Wed Jan 19 16:43:45 EST 2011


I have discovered why this happens and have a patch to fix it

It is happening because the Windows installer installs the script as
get_iplayer.pl not get_iplayer (no extension)

(For those who are interested and don't know, the Windows shortcuts
installed actually run a batch script called get_iplayer.cmd which
then calls "perl.exe get_iplayer.pl %*")

When the --update option is used it looks for get_iplayer (no
extension), doesn't find it and so gives the "get_iplayer is not
writable" error

I have confirmed this by making a copy of get_iplayer.pl as get_iplayer

Now the --update option works, however it works on the no extension
version and leaves the .pl version alone

As the batch script directly calls the .pl version, the shortcut still runs 2.78

If the batch script is changed to "perl.exe get_iplayer %*" it now
fires up 2.79 from the shortcut

My first idea was to update the installer and batch script to use the
no extension version.

But I think this may be quite a lot of effort and also may have other
issues with pvr etc that I am unaware of.

So my second idea was to update the get_iplayer.pl script so that if
it doesn't find a writeable file, it appends .pl to the filename and
tries again.

This now succesfully updates the get_iplayer.pl script from the
original batch script (perl.exe get_iplayer.pl %*)

Of course it updates to 2.79 which doesn't have this change in it so
now --update fails again!

If the patch is re-applied --update now reports "No update is
necessary" not "get_iplayer is not writable" - success!

I have attached a .patch file for my change

(apologies if the string concatenation code is in any way rubbish as I
am a VB and C# programmer and this is the first Perl I have ever
written!)

Enjoy!

Shevek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_iplayer.patch
Type: application/octet-stream
Size: 786 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/get_iplayer/attachments/20110119/b59fee04/attachment.obj>


More information about the get_iplayer mailing list