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
diff options
context:
space:
mode:
authoracsfer <carlos@reendex.com>2021-09-09 13:10:09 +0300
committeracsfer (Rebase PR Action) <carlos@reendex.com>2021-10-02 00:02:38 +0300
commit3a25183b66d30d34ca10d3b2411d8d333face4fd (patch)
tree0431a751afad6e28309edc4e8ab9d07925e02f68 /lib/private/Files/Storage
parentfb2fd3457650464230e052a91f573ba052950fef (diff)
Get `filesize()` if `file_exists()`
Should make sense.
Diffstat (limited to 'lib/private/Files/Storage')
-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 ccd331f515f..7f0bdbb6113 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -216,7 +216,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);