diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-07 16:29:23 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-06-08 09:46:49 +0200 |
commit | fa9c96ac4f2801db453023b86e41431374b52260 (patch) | |
tree | 986aadb5ba45583f5913fdcfc9f2f19da7ddda03 /apps/files_external/lib | |
parent | 4fd55c255fcea16de66fb070cf77ecbfbf71babe (diff) | |
download | nextcloud-server-fa9c96ac4f2801db453023b86e41431374b52260.tar.gz nextcloud-server-fa9c96ac4f2801db453023b86e41431374b52260.zip |
Fix GDrive file size when mime type doesn't match contents
Uploading a txt file with XML contents makes GDrive return the XML mime
type.
This fix makes sure the logic that returns "SPACE_UNKNOWN" for the size
properly rely on the Google Docs mime types.
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/Google.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/Google.php b/apps/files_external/lib/Lib/Storage/Google.php index 49fde7d066f..96f12800c10 100644 --- a/apps/files_external/lib/Lib/Storage/Google.php +++ b/apps/files_external/lib/Lib/Storage/Google.php @@ -326,7 +326,7 @@ class Google extends \OC\Files\Storage\Common { $stat['size'] = 0; } else { // Check if this is a Google Doc - if ($this->getMimeType($path) !== $file->getMimeType()) { + if ($this->isGoogleDocFile($file)) { // Return unknown file size $stat['size'] = \OCP\Files\FileInfo::SPACE_UNKNOWN; } else { |