From: Florin Peter Date: Tue, 28 May 2013 18:50:14 +0000 (+0200) Subject: fixed if fopen returns false typically on external storage X-Git-Tag: v5.0.7~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f9c9cceb3074a742d76d269ae7b45e4049e64dba;p=nextcloud-server.git fixed if fopen returns false typically on external storage --- diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 0d663549bf6..5335007a68c 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -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); }