Compare commits

...

1 Commits

Author SHA1 Message Date
Robin Appelman ae2cf51056
log failures for local fsize
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-03-14 18:16:49 +01:00
1 changed files with 7 additions and 1 deletions

View File

@ -165,7 +165,13 @@ class Local extends \OC\Files\Storage\Common {
$helper = new \OC\LargeFileHelper; $helper = new \OC\LargeFileHelper;
return $helper->getFileSize($fullPath); return $helper->getFileSize($fullPath);
} }
return filesize($fullPath); $result = filesize($fullPath);
if ($result === false) {
$exists = file_exists($fullPath);
$message = $exists ? "Failed to get size for $path even though file exists" : "Failed to get size for $path, file not found";
\OC::$server->getLogger()->logException(new \Exception($message), ['level' => ILogger::WARN]);
}
return $result;
} }
public function isReadable($path) { public function isReadable($path) {