diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-28 13:06:07 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-28 13:06:07 +0100 |
commit | 70db348475164ad595d3f7863b078df9efb236dc (patch) | |
tree | 087ca68e2f385e7b203fd8f1cb020f386d4d5b86 /lib/private | |
parent | d0012e729aa811d44da518b192d1614c9e4b8b76 (diff) | |
parent | 7a8f1389fec7db92e1da4f4d46bf0b2737bd3482 (diff) | |
download | nextcloud-server-70db348475164ad595d3f7863b078df9efb236dc.tar.gz nextcloud-server-70db348475164ad595d3f7863b078df9efb236dc.zip |
Merge pull request #7824 from owncloud/hash-parameter-order
Fix parameter order for Storage\Local::hash
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files/storage/common.php | 3 | ||||
-rw-r--r-- | lib/private/files/storage/local.php | 2 | ||||
-rw-r--r-- | lib/private/files/storage/mappedlocal.php | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 3c078d7b1b4..2b697141515 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -160,8 +160,7 @@ abstract class Common implements \OC\Files\Storage\Storage { public function hash($type, $path, $raw = false) { $tmpFile = $this->getLocalFile($path); - $hash = hash($type, $tmpFile, $raw); - unlink($tmpFile); + $hash = hash_file($type, $tmpFile, $raw); return $hash; } diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php index 0f906ec55b4..571bf7f97c1 100644 --- a/lib/private/files/storage/local.php +++ b/lib/private/files/storage/local.php @@ -256,7 +256,7 @@ if (\OC_Util::runningOnWindows()) { return 0; } - public function hash($path, $type, $raw = false) { + public function hash($type, $path, $raw = false) { return hash_file($type, $this->datadir . $path, $raw); } diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php index 026f6ec895e..94ee28ca763 100644 --- a/lib/private/files/storage/mappedlocal.php +++ b/lib/private/files/storage/mappedlocal.php @@ -276,7 +276,7 @@ class MappedLocal extends \OC\Files\Storage\Common{ return 0; } - public function hash($path, $type, $raw=false) { + public function hash($type, $path, $raw=false) { return hash_file($type, $this->buildPath($path), $raw); } |