Skip to content
Snippets Groups Projects
Commit 02404a6a authored by jknockaert's avatar jknockaert Committed by Thomas Müller
Browse files

Fixing encryption stream wrapper seek - thanks @jknockaert

parent 104d11ec
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment