summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-02 17:34:24 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-20 09:33:59 +0200
commitdb4c7fe743d7cd2019612c9acd732ca0ec4467ea (patch)
tree6be66c74ff5f41aa75819eadd1c75213abfdc94e /lib
parent63bbbf29f4b8fc49faf8aafd7ebf27a12e892a06 (diff)
downloadnextcloud-server-db4c7fe743d7cd2019612c9acd732ca0ec4467ea.tar.gz
nextcloud-server-db4c7fe743d7cd2019612c9acd732ca0ec4467ea.zip
Add encoding wrapper as opt-in mount option
The encoding wrapper is now only applied when the mount option is set, disabled by default.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/util.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index 4196aa6637c..de97a762246 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -172,10 +172,8 @@ class OC_Util {
return $storage;
});
- // install storage availability wrapper, before most other wrappers
- \OC\Files\Filesystem::addStorageWrapper('oc_encoding', function ($mountPoint, $storage) {
- // TODO: only do this opt-in if the mount option is specified
- if (!$storage->instanceOfStorage('\OC\Files\Storage\Shared') && !$storage->isLocal()) {
+ \OC\Files\Filesystem::addStorageWrapper('oc_encoding', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
+ if ($mount->getOption('encoding_compatibility', true) && !$storage->instanceOfStorage('\OC\Files\Storage\Shared') && !$storage->isLocal()) {
return new \OC\Files\Storage\Wrapper\Encoding(['storage' => $storage]);
}
return $storage;