diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/util.php | 6 |
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; |