mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Using Filesystem::makeFolder() instead of mkdir() in Folder for file operations (from r107275)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112566 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
35b41709c2
commit
07494a5f93
@ -66,7 +66,7 @@ class Folder extends File {
|
||||
*/
|
||||
static function findOrMake($folderPath) {
|
||||
// Create assets directory, if it is missing
|
||||
if(!file_exists(ASSETS_PATH)) mkdir(ASSETS_PATH,Filesystem::$folder_create_mask);
|
||||
if(!file_exists(ASSETS_PATH)) Filesystem::makeFolder(ASSETS_PATH);
|
||||
|
||||
$folderPath = trim(Director::makeRelative($folderPath));
|
||||
// replace leading and trailing slashes
|
||||
@ -87,7 +87,7 @@ class Folder extends File {
|
||||
$item->write();
|
||||
}
|
||||
if(!file_exists($item->getFullPath())) {
|
||||
mkdir($item->getFullPath(),Filesystem::$folder_create_mask);
|
||||
Filesystem::makeFolder($item->getFullPath());
|
||||
}
|
||||
$parentID = $item->ID;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user