summaryrefslogtreecommitdiffstats
path: root/lib/files/cache
diff options
context:
space:
mode:
Diffstat (limited to 'lib/files/cache')
-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));