mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge branch '3.4' into 3.5
This commit is contained in:
commit
aa2d0fb247
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user