log failures for local fsize
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
762a8bb3d9
commit
ae2cf51056
|
@ -165,7 +165,13 @@ class Local extends \OC\Files\Storage\Common {
|
|||
$helper = new \OC\LargeFileHelper;
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue