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)
|
$newFilePosition = floor($newPosition / $this->unencryptedBlockSize)
|
||||||
* $this->util->getBlockSize() + $this->util->getHeaderSize();
|
* $this->util->getBlockSize() + $this->util->getHeaderSize();
|
||||||
|
|
||||||
|
$oldFilePosition = parent::stream_tell();
|
||||||
if (parent::stream_seek($newFilePosition)) {
|
if (parent::stream_seek($newFilePosition)) {
|
||||||
|
parent::stream_seek($oldFilePosition);
|
||||||
$this->flush();
|
$this->flush();
|
||||||
|
parent::stream_seek($newFilePosition);
|
||||||
$this->position = $newPosition;
|
$this->position = $newPosition;
|
||||||
$return = true;
|
$return = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue