diff --git a/filemin/extract.cgi b/filemin/extract.cgi index b9eb63983..55a1a3af4 100755 --- a/filemin/extract.cgi +++ b/filemin/extract.cgi @@ -24,7 +24,7 @@ elsif ($archive_type =~ /x-7z/) { elsif ($archive_type =~ /\/zip/) { $cmd = "unzip ".quotemeta("$cwd/$in{'file'}")." -d ".quotemeta($cwd); } -elsif ($archive_type =~ /\/x-rar/) { +elsif ($archive_type =~ /\/x-rar|\/vnd\.rar/) { $cmd = "unrar x -r -y ".quotemeta("$cwd/$in{'file'}"). " ".quotemeta($cwd); } diff --git a/filemin/filemin-lib.pl b/filemin/filemin-lib.pl index 3cc6cb51b..f634ff07d 100644 --- a/filemin/filemin-lib.pl +++ b/filemin/filemin-lib.pl @@ -339,28 +339,26 @@ sub print_interface { ) { $actions = "$actions$edit_icon"; } - if ( ( index( $type, "application-zip" ) != -1 && has_command('unzip') ) - || ( index( $type, "application-x-7z-compressed" ) != -1 && has_command('7z') ) - || ( index( $type, "application-x-rar" ) != -1 && has_command('unrar') ) - || ( index( $type, "application-x-rpm" ) != -1 && has_command('rpm2cpio') && has_command('cpio') ) - || ( index( $type, "application-x-deb" ) != -1 && has_command('dpkg') ) - || (( index( $type, "x-compressed-tar" ) != -1 - || index( $type, "-x-tar" ) != -1 - || ( index( $type, "-x-bzip" ) != -1 && has_command('bzip2') ) - || ( index( $type, "-gzip" ) != -1 && has_command('gzip') ) - || ( index( $type, "-x-xz" ) != -1 && has_command('xz') ) - ) - && has_command('tar') - ) - ) - { - $actions - = "$actions $extract_icon "; - } + if ((index($type, "application-zip") != -1 && has_command('unzip')) || + (index($type, "application-x-7z-compressed") != -1 && has_command('7z')) || + ((index($type, "application-x-rar") != -1 || index($type, "application-vnd.rar") != -1) && has_command('unrar')) || + (index($type, "application-x-rpm") != -1 && has_command('rpm2cpio') && has_command('cpio')) || + (index($type, "application-x-deb") != -1 && has_command('dpkg')) + || + ( + (index($type, "x-compressed-tar") != -1 || + index($type, "-x-tar") != -1 || + (index($type, "-x-bzip") != -1 && has_command('bzip2')) || + (index($type, "-gzip") != -1 && has_command('gzip')) || + (index($type, "-x-xz") != -1 && has_command('xz')) + ) && + has_command('tar'))) + { + $actions = + "$actions $extract_icon "; + } + } @row_data = ( "", diff --git a/filemin/images/icons/mime/application-vnd.rar.png b/filemin/images/icons/mime/application-vnd.rar.png new file mode 100644 index 000000000..8d91396fa Binary files /dev/null and b/filemin/images/icons/mime/application-vnd.rar.png differ