diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-04-29 12:42:37 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-20 09:33:59 +0200 |
commit | 63bbbf29f4b8fc49faf8aafd7ebf27a12e892a06 (patch) | |
tree | 16d385b238441e0b0c1ee1605e6899a0c2b099be /lib/private/legacy/util.php | |
parent | 2ef751b1ec28f7b5c7113af60ec8c9fa0ae1cf87 (diff) | |
download | nextcloud-server-63bbbf29f4b8fc49faf8aafd7ebf27a12e892a06.tar.gz nextcloud-server-63bbbf29f4b8fc49faf8aafd7ebf27a12e892a06.zip |
Add wrapper for NFD encoding workaround
Diffstat (limited to 'lib/private/legacy/util.php')
-rw-r--r-- | lib/private/legacy/util.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index 4f7a8668dfc..4196aa6637c 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -172,6 +172,15 @@ 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()) { + return new \OC\Files\Storage\Wrapper\Encoding(['storage' => $storage]); + } + return $storage; + }); + \OC\Files\Filesystem::addStorageWrapper('oc_quota', function ($mountPoint, $storage) { // set up quota for home storages, even for other users // which can happen when using sharing |