Fixing encryption stream wrapper seek - thanks @jknockaert

remotes/origin/poc-doctrine-migrations
jknockaert 11 years ago committed by Thomas Müller
parent 104d11ec4c
commit 02404a6a8c
  1. 3
      lib/private/files/stream/encryption.php

@ -362,8 +362,11 @@ class Encryption extends Wrapper {
$newFilePosition = floor($newPosition / $this->unencryptedBlockSize)
* $this->util->getBlockSize() + $this->util->getHeaderSize();
$oldFilePosition = parent::stream_tell();
if (parent::stream_seek($newFilePosition)) {
parent::stream_seek($oldFilePosition);
$this->flush();
parent::stream_seek($newFilePosition);
$this->position = $newPosition;
$return = true;
}

Loading…
Cancel
Save