use binary safe read

This commit is contained in:
Robin Appelman 2014-03-20 16:45:24 +01:00 committed by Andreas Fischer
parent 54a15a8001
commit 1c7a71ca77
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
}
public function hash($type, $path, $raw = false) {
$fh = $this->fopen($path, 'r');
$fh = $this->fopen($path, 'rb');
$ctx = hash_init($type);
hash_update_stream($ctx, $fh);
fclose($fh);