A bug in get_iplayer-3.01?

RS richard22j at zoho.com
Mon Jun 5 01:48:33 PDT 2017


>From: Alan Milewczyk Sent: Saturday, June 3, 2017 22:50

>> Sent: Saturday, June 3, 2017 14:26  I wrote
>> The question would appear to be why $is_path is true in Linux but not in 
>> Windows.  I don't know enough Perl to be able to answer.

>Me neither but maybe the reason is that \ is used in Windows to denote a 
>folder/directory whereas in Linux it is /.

The \ for Windows directories is handled by
    # Replace backslashes with _ if not Windows path
    $string =~ s/\\/_/g unless $^O eq "MSWin32" && $is_path;

It is complicated, though.  In another part of the code there is a variable 
sanitize_mode which can have values between 0 and 4 to denote different 
treatment for sanitising file and directory names, and I haven't worked out 
how that gets set.

--fatfilename seems to be a red herring.  It used to remove characters in 
$fat_bad = '["*:<>?|]'
so it didn't do anything with /.

Did v2.97 and earlier handle / in filenames in Linux correctly?  If it did I 
can't see where the present code is different.





More information about the get_iplayer mailing list