[EP-tech] case-sensitiv File-extensions-query

David R Newman drn at ecs.soton.ac.uk
Fri Oct 30 15:08:51 GMT 2020


Hi Avi,

You are not the first person to pick up on this issue:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fissues%2F54&data=04%7C01%7C%7C7ebdfeccfb1642a5f11f08d87ce5b747%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637396673366687036%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6HUcj00C1v3o0vZN7x%2F0QdqkPYH3V78UlWENHnu4yT0%3D&reserved=0

I was unable to get understand why this was not made case-insensitive so 
I amended this in:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fcommit%2F7828cf32577179b6e2a47bba2e209bf43a86175e&data=04%7C01%7C%7C7ebdfeccfb1642a5f11f08d87ce5b747%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637396673366697035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Q5kyIo8fNfS6zNhkvVtqI5fJmdFuNDR63Qa40R1tXkI%3D&reserved=0

So matching is now case-insensitive since EPrints 3.4.2.  I don't see 
any reason you could not backport this to an earlier version of EPrints 
(both 3.3.x and 3.4.x) if you have not yet upgraded to EPrints 3.4.2.

Regards

David Newman

On 30/10/2020 14:59, Stenger, Avischai via Eprints-tech wrote:
> CAUTION: This e-mail originated outside the University of Southampton.
>
> Hi,
>
> i am wondering why ist the extensions-test in lib/cfg.d/media_info.pl case-sensitive,
>
> ( $filename =~ /\.(pdf|doc|docx|odt)$/ ) etc.
>
> and not like:
>
> ( $filename =~ /\.(pdf|doc|docx|odt)$/i ) etc.
>
>
> we get files with both extensions, [NAME].pdf and [NAME].PDF and now they are marked as in different Format.
>
>
> [NAME].pdf will be format=Text
> but
> [NAME].PDF will be format=Other
>
> is it accidentally or dose it have a reason that i don’t recognise?
>
>
> Tanks & have a great weekend
>
>
> Avi
>
>
>
>
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=04%7C01%7C%7C7ebdfeccfb1642a5f11f08d87ce5b747%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637396673366697035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=cFcriT5tyY%2FSl5ywBTDMC078DVS3vX%2BBn%2FQEmZVGezw%3D&reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=04%7C01%7C%7C7ebdfeccfb1642a5f11f08d87ce5b747%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637396673366697035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=SNb1uf18y9PbntH5k5gNjSTPHBPbNKY032fKwYn4Da8%3D&reserved=0

-- 
This email has been checked for viruses by AVG.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&data=04%7C01%7C%7C7ebdfeccfb1642a5f11f08d87ce5b747%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637396673366697035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oz8jdNiZrP%2F4OaigQXCKnrS6hCbOO%2FSNGIHDcmPV9ng%3D&reserved=0




More information about the Eprints-tech mailing list