Only handle encrypted property on folders

Exposing the encrypted property is required for E2E. However, there is
no need to expose this on files as then it is server side encryption
(which the clients don't care about).

Better to not confuse the output.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-01-30 12:25:49 +01:00
parent c30e958dac
commit f924a6d7d9
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 5 deletions

View File

@ -339,11 +339,6 @@ class FilesPlugin extends ServerPlugin {
}
});
$propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) {
$result = $node->getFileInfo()->isEncrypted() ? '1' : '0';
return $result;
});
$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
});
@ -392,6 +387,10 @@ class FilesPlugin extends ServerPlugin {
$propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
return $node->getSize();
});
$propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) {
return $node->getFileInfo()->isEncrypted() ? '1' : '0';
});
}
}