mirror of
https://github.com/nextcloud/server.git
synced 2026-03-05 06:50:55 -05:00
fixed if fopen returns false typically on external storage
This commit is contained in:
parent
1d720099c3
commit
71a532fc4d
1 changed files with 1 additions and 1 deletions
|
|
@ -541,7 +541,7 @@ class Util {
|
|||
// we only need 24 byte from the last chunk
|
||||
$data = '';
|
||||
$handle = $this->view->fopen($path, 'r');
|
||||
if (!fseek($handle, -24, SEEK_END)) {
|
||||
if (is_resource($handle) && !fseek($handle, -24, SEEK_END)) {
|
||||
$data = fgets($handle);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue