From c245f5a99fcd0c273de8e86d5496e86d61151d6c Mon Sep 17 00:00:00 2001
From: Florin Peter <github@florin-peter.de>
Date: Sat, 25 May 2013 14:56:00 +0200
Subject: [PATCH] added more places where normalization is needed

---
 lib/files/cache/cache.php | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 2c34fb7792..dc5e3e20fc 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));
-- 
GitLab