mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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) {
|
static function findOrMake($folderPath) {
|
||||||
// Create assets directory, if it is missing
|
// 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));
|
$folderPath = trim(Director::makeRelative($folderPath));
|
||||||
// replace leading and trailing slashes
|
// replace leading and trailing slashes
|
||||||
@ -87,7 +87,7 @@ class Folder extends File {
|
|||||||
$item->write();
|
$item->write();
|
||||||
}
|
}
|
||||||
if(!file_exists($item->getFullPath())) {
|
if(!file_exists($item->getFullPath())) {
|
||||||
mkdir($item->getFullPath(),Filesystem::$folder_create_mask);
|
Filesystem::makeFolder($item->getFullPath());
|
||||||
}
|
}
|
||||||
$parentID = $item->ID;
|
$parentID = $item->ID;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user