Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichaIng <micha@dietpi.com>2021-10-30 01:19:35 +0300
committerGitHub <noreply@github.com>2021-10-30 01:19:35 +0300
commite250aef6b44059eb9f7a2ab87fc05339323e4d14 (patch)
tree65437217330fc425738a9ca24a7941fc95e27df0 /lib
parent81b3e6570327001e75cf1ee3e0a17886ab4ed549 (diff)
parent8610099c5f888bf07b2904031b6ee7968a34e77b (diff)
Merge pull request #29416 from nextcloud/backport/27440/stable21
[stable21] Handle files with `is_file` instead of `file_exists`
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 125338a290d..ef5697cdd24 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -391,7 +391,7 @@ class Encryption extends Wrapper {
if ($this->util->isExcluded($fullPath) === false) {
$size = $unencryptedSize = 0;
$realFile = $this->util->stripPartialFileExtension($path);
- $targetExists = $this->file_exists($realFile) || $this->file_exists($path);
+ $targetExists = $this->is_file($realFile) || $this->file_exists($path);
$targetIsEncrypted = false;
if ($targetExists) {
// in case the file exists we require the explicit module as
@@ -855,7 +855,7 @@ class Encryption extends Wrapper {
*/
protected function readFirstBlock($path) {
$firstBlock = '';
- if ($this->storage->file_exists($path)) {
+ if ($this->storage->is_file($path)) {
$handle = $this->storage->fopen($path, 'r');
$firstBlock = fread($handle, $this->util->getHeaderSize());
fclose($handle);
@@ -872,7 +872,7 @@ class Encryption extends Wrapper {
protected function getHeaderSize($path) {
$headerSize = 0;
$realFile = $this->util->stripPartialFileExtension($path);
- if ($this->storage->file_exists($realFile)) {
+ if ($this->storage->is_file($realFile)) {
$path = $realFile;
}
$firstBlock = $this->readFirstBlock($path);
@@ -920,7 +920,7 @@ class Encryption extends Wrapper {
*/
protected function getHeader($path) {
$realFile = $this->util->stripPartialFileExtension($path);
- $exists = $this->storage->file_exists($realFile);
+ $exists = $this->storage->is_file($realFile);
if ($exists) {
$path = $realFile;
}