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:
authoracsfer <carlos@reendex.com>2021-09-09 13:10:09 +0300
committerJohn Molakvoæ (Rebase PR Action) <skjnldsv@users.noreply.github.com>2021-10-21 10:36:22 +0300
commitf902cfaffe69c7c5f230d6b4edfa6a99f4b35fa8 (patch)
tree92ab9bc89d16767b9e40c2794175cb5754a1770d /lib
parent595d21c922541c45567ccb19d2b3cd23153d910f (diff)
Get `filesize()` if `file_exists()`
Should make sense.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Local.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 0ef58698623..9315a7fab90 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -217,7 +217,7 @@ class Local extends \OC\Files\Storage\Common {
}
public function filesize($path) {
- if ($this->is_dir($path)) {
+ if ($this->is_dir($path) || !$this->file_exists($path)) {
return 0;
}
$fullPath = $this->getSourcePath($path);