Skip to content
Snippets Groups Projects
Commit c245f5a9 authored by Florin Peter's avatar Florin Peter
Browse files

added more places where normalization is needed

parent f6bf9de6
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment