use a normal rename when moving from the same storage in the encryption wrapper

This commit is contained in:
Robin Appelman 2015-09-07 17:19:50 +02:00 committed by Morris Jobke
parent cf9fb034c4
commit b1ce53f890

View file

@ -424,6 +424,9 @@ class Encryption extends Wrapper {
* @return bool
*/
public function moveFromStorage(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = true) {
if ($sourceStorage === $this) {
return $this->rename($sourceInternalPath, $targetInternalPath);
}
// TODO clean this up once the underlying moveFromStorage in OC\Files\Storage\Wrapper\Common is fixed:
// - call $this->storage->moveFromStorage() instead of $this->copyBetweenStorage