Merge branch 'master' of github.com:webmin/webmin

This commit is contained in:
Jamie Cameron
2020-12-20 19:38:37 -08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ if ((lc(get_charset()) eq "utf-8" && ($encoding_name && lc($encoding_name) ne "u
}
eval {$data = Encode::encode('utf-8', Encode::decode($encoding_name, $data))};
}
my $file_binary = -B $file;
my $file_binary = -s $file >= 128 && -B $file;
&ui_print_header(undef, $text{'edit_file'}, "");
$head = "<link rel='stylesheet' type='text/css' href='unauthenticated/css/style.css' />";

View File

@@ -2763,7 +2763,7 @@ if (defined(&theme_ui_read_file_contents_limit)) {
return &theme_ui_read_file_contents_limit(@_);
}
my ($opts) = @_;
my $binary = -B $opts->{'file'};
my $binary = -s $opts->{'file'} >= 128 && -B $opts->{'file'};
my $data = &read_file_contents_limit($opts->{'file'}, $opts->{'limit'}, $opts);
my $error = $data->{'error'};
if ($error) {