Skip to content

Commit

Permalink
Move moveFromCache to CacheJail
Browse files Browse the repository at this point in the history
  • Loading branch information
rullzer authored and Vincent Petry committed Jul 5, 2017
1 parent 6a19c40 commit 0086803
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/private/files/cache/wrapper/cachejail.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,22 @@ public function getPathById($id) {
return $this->getJailedPath($path);
}

/**
* Move a file or folder in the cache
*
* Note that this should make sure the entries are removed from the source cache
*
* @param \OCP\Files\Cache\ICache $sourceCache
* @param string $sourcePath
* @param string $targetPath
*/
public function moveFromCache(\OCP\Files\Cache\ICache $sourceCache, $sourcePath, $targetPath) {
if ($sourceCache === $this) {
return $this->move($sourcePath, $targetPath);
}
return $this->cache->moveFromCache($sourceCache, $sourcePath, $targetPath);
}

protected function getMoveInfo($path) {
return [$this->getNumericStorageId(), $this->getSourcePath($path)];
}
Expand Down

0 comments on commit 0086803

Please sign in to comment.