diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-07-05 14:58:33 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-07-05 16:03:20 +0200 |
commit | 9575c2f37c39ae0799c3b8faec4d7902d17e6832 (patch) | |
tree | 264b451f93e37eaa0b6ba45627f2201e13bbb104 /apps/files_encryption/hooks | |
parent | ec6350079f5eab706bb4567654c99c6f800a4f49 (diff) | |
download | nextcloud-server-9575c2f37c39ae0799c3b8faec4d7902d17e6832.tar.gz nextcloud-server-9575c2f37c39ae0799c3b8faec4d7902d17e6832.zip |
added helper function to escape glob pattern
Conflicts:
apps/files_encryption/lib/helper.php
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index c26119b6c2e..b2a17f6bca5 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -497,7 +497,7 @@ class Hooks { // handle share-keys
$localKeyPath = $view->getLocalFile($baseDir . 'share-keys/' . $params['oldpath']);
- $escapedPath = preg_replace('/(\*|\?|\[)/', '[$1]', $localKeyPath);
+ $escapedPath = Helper::escapeGlobPattern($localKeyPath);
$matches = glob($escapedPath . '*.shareKey');
foreach ($matches as $src) {
$dst = \OC\Files\Filesystem::normalizePath(str_replace($params['oldpath'], $params['newpath'], $src));
|