Only call $this->filesize() for files.

remotes/origin/ldap_group_count
Andreas Fischer 12 years ago
parent df29eec72b
commit fb7ec2bb22
  1. 2
      lib/private/files/storage/local.php
  2. 2
      lib/private/files/storage/mappedlocal.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;

@ -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;

Loading…
Cancel
Save