diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index ccd331f515f37..7f0bdbb611308 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -216,7 +216,7 @@ public function filetype($path) { } public function filesize($path) { - if ($this->is_dir($path)) { + if ($this->is_dir($path) || !$this->file_exists($path)) { return 0; } $fullPath = $this->getSourcePath($path);