mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #55731 from nextcloud/jtr/fix-files-stream-quota-actual
fix(files): decrement quota by actual bytes written in stream_write
This commit is contained in:
commit
48378aede3
1 changed files with 5 additions and 2 deletions
|
|
@ -78,7 +78,10 @@ class Quota extends Wrapper {
|
|||
$data = substr($data, 0, $this->limit);
|
||||
$size = $this->limit;
|
||||
}
|
||||
$this->limit -= $size;
|
||||
return fwrite($this->source, $data);
|
||||
$written = fwrite($this->source, $data);
|
||||
// Decrement quota by the actual number of bytes written ($written),
|
||||
// not the intended size
|
||||
$this->limit -= $written;
|
||||
return $written;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue