From: Michael Gapczynski Date: Fri, 17 May 2013 15:42:14 +0000 (-0400) Subject: Prepare for #2013 fix X-Git-Tag: v5.0.11~41^2~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e4289cf629c19f575eaa9895f000d373378533ab;p=nextcloud-server.git Prepare for #2013 fix --- diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 3f7a9877f78..36b890e82e8 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -248,7 +248,13 @@ class Google extends \OC\Files\Storage\Common { if ($this->filetype($path) === 'dir') { $stat['size'] = 0; } else { - $stat['size'] = $file->getFileSize(); + // Check if this is a Google Doc + if ($this->getMimeType($path) !== $file->getMimeType()) { + // Return unknown file size + $stat['size'] = \OC\Files\Filesystem::FREE_SPACE_UNKNOWN; + } else { + $stat['size'] = $file->getFileSize(); + } } $stat['atime'] = strtotime($file->getLastViewedByMeDate()); $stat['mtime'] = strtotime($file->getModifiedDate());