Fixing encryption stream wrapper seek - thanks @jknockaert
This commit is contained in:
parent
104d11ec4c
commit
02404a6a8c
|
@ -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…
Reference in New Issue