Skip to content

Commit

Permalink
Fix to respect vendor-specific MIME type webmin/webmin#702
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Rostovtsev committed Apr 5, 2018
1 parent 3fbb538 commit 8275417
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions/file-manager/extract.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ foreach my $name (split(/\0/, $in{'name'})) {
&backquote_logged("7z x -aoa " . quotemeta("$cwd/$name") . " -o" . quotemeta($cwd));
} elsif ($archive_type =~ /\/zip/) {
&backquote_logged("unzip -o " . quotemeta("$cwd/$name") . " -d " . quotemeta($cwd));
} elsif ($archive_type =~ /\/x-rar/) {
} elsif ($archive_type =~ /\/x-rar|\/vnd\.rar/) {
&backquote_logged("unrar x -r -y -o+ " . quotemeta("$cwd/$name") . " " . quotemeta($cwd));
} elsif ($archive_type =~ "/x-rpm" || $archive_type =~ /\/x-deb/) {
my $dir = fileparse("$cwd/$name", qr/\.[^.]*/);
Expand Down
2 changes: 1 addition & 1 deletion extensions/file-manager/file-manager-lib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ sub print_content
if (($type =~ /application-zip/ && has_command('unzip')) ||
($type =~ /application-x-7z-compressed/ &&
has_command('7z')) ||
($type =~ /application-x-rar/ &&
($type =~ /application-x-rar|application-vnd\.rar/ &&
has_command('unrar')) ||
($type =~ /application-x-rpm/ &&
has_command('rpm2cpio') &&
Expand Down

0 comments on commit 8275417

Please sign in to comment.