summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2017-03-24 11:28:54 +0100
committerJoas Schilling <coding@schilljs.com>2017-04-26 16:12:48 +0200
commit1c771c097a478ee461bfbc3447c84a4abea22c8c (patch)
treed3b4fe7cb413f7a32584a993ecb6bccc5fc4fcd0 /lib
parent327094d5574ed9cf330edcf33529ef7745b7b5f0 (diff)
downloadnextcloud-server-1c771c097a478ee461bfbc3447c84a4abea22c8c.tar.gz
nextcloud-server-1c771c097a478ee461bfbc3447c84a4abea22c8c.zip
Use regex to detect part files
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/util.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index d2012835980..d49599cb8a1 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -1389,8 +1389,8 @@ class OC_Util {
return false;
}
- $path_parts = pathinfo($trimmed);
- if ($path_parts['extension'] === 'part') {
+ // detect part files
+ if (preg_match('/' . \OCP\Files\FileInfo::BLACKLIST_FILES_REGEX . '/', $trimmed) !== 0) {
return false;
}