summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-25 14:56:00 +0200
committerFlorin Peter <github@florin-peter.de>2013-05-25 14:56:00 +0200
commitc245f5a99fcd0c273de8e86d5496e86d61151d6c (patch)
treed66733a584466c4a8f66efe7b243c91daaedaeb6
parentf6bf9de6def749b26d44a6f8d8ef85d0561cfaf9 (diff)
downloadnextcloud-server-c245f5a99fcd0c273de8e86d5496e86d61151d6c.tar.gz
nextcloud-server-c245f5a99fcd0c273de8e86d5496e86d61151d6c.zip
added more places where normalization is needed
-rw-r--r--lib/files/cache/cache.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 2c34fb77925..dc5e3e20fc7 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -343,6 +343,10 @@ class Cache {
* @param string $target
*/
public function move($source, $target) {
+ // normalize source and target
+ $source = $this->normalize($source);
+ $target = $this->normalize($target);
+
$sourceData = $this->get($source);
$sourceId = $sourceData['fileid'];
$newParentId = $this->getParentId($target);
@@ -383,6 +387,9 @@ class Cache {
* @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
*/
public function getStatus($file) {
+ // normalize file
+ $file = $this->normalize($file);
+
$pathHash = md5($file);
$query = \OC_DB::prepare('SELECT `size` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path_hash` = ?');
$result = $query->execute(array($this->getNumericStorageId(), $pathHash));