diff options
Diffstat (limited to 'apps/files_encryption/lib/helper.php')
-rwxr-xr-x | apps/files_encryption/lib/helper.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index 31cf48a0393..1b9637c1b9a 100755 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -218,7 +218,6 @@ class Helper { exit(); } - /** * check requirements for encryption app. * @return bool true if requirements are met @@ -234,3 +233,14 @@ class Helper { return (bool) $result; } } + + /** + * @brief glob uses different pattern than regular expressions, escape glob pattern only + * @param unescaped path + * @return escaped path + */ + public static function escapeGlobPattern($path) { + return preg_replace('/(\*|\?|\[)/', '[$1]', $path); + } +} + |