mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Folder::findOrMake() will call mkdir if needed, even if object already exists in database.
This covers the corner case where DB is out of sync with filesystem. (from r97878) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102541 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
279031cc3a
commit
ba3c070dbd
@ -63,7 +63,9 @@ class Folder extends File {
|
||||
$item->Name = $part;
|
||||
$item->Title = $part;
|
||||
$item->write();
|
||||
if(!file_exists($item->getFullPath())) Filesystem::makeFolder($item->getFullPath());
|
||||
}
|
||||
if(!file_exists($item->getFullPath())) {
|
||||
mkdir($item->getFullPath(),Filesystem::$folder_create_mask);
|
||||
}
|
||||
$parentID = $item->ID;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user