mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
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.
This commit is contained in:
parent
4fd55c255f
commit
fa9c96ac4f
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue