Skip to content
Permalink
Browse files

Case-insensitive test for guessing document type by file extension. F…

…ixes #54
  • Loading branch information
drn05r authored and EPrints Services committed May 11, 2020
1 parent c841dda commit 7828cf32577179b6e2a47bba2e209bf43a86175e
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/cfg.d/media_info.pl
@@ -12,19 +12,19 @@
}
}

if( $filename =~ /\.(pdf|doc|docx|odt)$/ && $valid{text} )
if( $filename =~ /\.(pdf|doc|docx|odt)$/i && $valid{text} )
{
return "text";
}
elsif( $filename =~ /\.(ppt|pptx|odp)$/ && $valid{slideshow} )
elsif( $filename =~ /\.(ppt|pptx|odp)$/i && $valid{slideshow} )
{
return "slideshow";
}
elsif( $filename =~ /\.(zip|tgz|gz)$/ && $valid{archive} )
elsif( $filename =~ /\.(zip|tgz|gz)$/i && $valid{archive} )
{
return "archive";
}
elsif( $filename =~ /\.(xls|xlsx|ods)$/ && $valid{spreadsheet} )
elsif( $filename =~ /\.(xls|xlsx|ods)$/i && $valid{spreadsheet} )
{
return "spreadsheet";
}

1 comment on commit 7828cf3

@Pfiffikus

This comment has been minimized.

Copy link
Contributor

@Pfiffikus Pfiffikus commented on 7828cf3 May 11, 2020

the most fast closed issue ever!?

Please sign in to comment.