Merge branch '3.4' into 3.5

This commit is contained in:
Daniel Hensby 2017-01-31 20:09:00 +00:00
commit aa2d0fb247
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -68,7 +68,7 @@ class CMSFileAddController extends LeftAndMain {
if($folder->exists() && $folder->getFilename()) {
// The Upload class expects a folder relative *within* assets/
$path = preg_replace('/^' . ASSETS_DIR . '\//', '', $folder->getFilename());
$path = preg_replace('/^' . preg_quote(ASSETS_DIR, '/') . '\//', '', $folder->getFilename());
$uploadField->setFolderName($path);
} else {
$uploadField->setFolderName('/'); // root of the assets