Added support for BSD md5 incase md5sum isn't available.

This commit is contained in:
Ian Bradley 2014-09-15 16:33:37 -07:00
parent 39cecea579
commit c1ecef3772
2 changed files with 18 additions and 2 deletions

View file

@ -566,7 +566,9 @@ if (isset($_POST['delete'])) {
error($config['error']['nomove']);
}
if ($output = shell_exec_error("cat $filenames | md5sum")) {
$md5cmd = $config['bsd_md5'] ? 'md5 -r' : 'md5sum';
if ($output = shell_exec_error("cat $filenames | $md5cmd")) {
$explodedvar = explode(' ', $output);
$hash = $explodedvar[0];
$post['filehash'] = $hash;
@ -925,4 +927,3 @@ if (isset($_POST['delete'])) {
error($config['error']['nopost']);
}
}