[Pkg-owncloud-commits] [owncloud] 127/199: Only call $this->filesize() for files.
David Prévot
taffit at moszumanska.debian.org
Sun Jun 1 18:53:17 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit fb7ec2bb22055886d55a779b9c19f48daee438c5
Author: Andreas Fischer <bantu at owncloud.com>
Date: Wed Feb 12 13:58:07 2014 +0100
Only call $this->filesize() for files.
---
lib/private/files/storage/local.php | 2 +-
lib/private/files/storage/mappedlocal.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index 883a69d..f4bc508 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -89,7 +89,7 @@ if (\OC_Util::runningOnWindows()) {
public function stat($path) {
$fullPath = $this->datadir . $path;
$statResult = stat($fullPath);
- if (PHP_INT_SIZE === 4) {
+ if (PHP_INT_SIZE === 4 && !$this->is_dir($path)) {
$filesize = $this->filesize($path);
$statResult['size'] = $filesize;
$statResult[7] = $filesize;
diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php
index 78d2616..f38b48d 100644
--- a/lib/private/files/storage/mappedlocal.php
+++ b/lib/private/files/storage/mappedlocal.php
@@ -111,7 +111,7 @@ class MappedLocal extends \OC\Files\Storage\Common {
public function stat($path) {
$fullPath = $this->buildPath($path);
$statResult = stat($fullPath);
- if (PHP_INT_SIZE === 4) {
+ if (PHP_INT_SIZE === 4 && !$this->is_dir($path)) {
$filesize = $this->filesize($path);
$statResult['size'] = $filesize;
$statResult[7] = $filesize;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list