Recursive folder creation in Upload

This commit is contained in:
Ingo Schommer 2013-05-13 15:45:21 +02:00
parent bb6283740a
commit 68af8409a5

View File

@ -127,11 +127,8 @@ class Upload extends Controller {
$parentFolder = Folder::find_or_make($folderPath);
// Create a folder for uploading.
if(!file_exists(ASSETS_PATH)){
mkdir(ASSETS_PATH, Config::inst()->get('Filesystem', 'folder_create_mask'));
}
if(!file_exists(ASSETS_PATH . "/" . $folderPath)){
mkdir(ASSETS_PATH . "/" . $folderPath, Config::inst()->get('Filesystem', 'folder_create_mask'));
Filesystem::makeFolder(ASSETS_PATH . "/" . $folderPath);
}
// Generate default filename