mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-15 07:55:31 +00:00
Allow saving resources with parent directory being recursively created
This commit is contained in:
parent
f1cc8ddde4
commit
4e0fc6d1de
@ -202,8 +202,8 @@ abstract class PluginBase implements Plugin{
|
||||
}
|
||||
|
||||
$out = $this->dataFolder . $filename;
|
||||
if(!file_exists($this->dataFolder)){
|
||||
mkdir($this->dataFolder, 0755, true);
|
||||
if(!file_exists(dirname($out))){
|
||||
mkdir(dirname($out), 0755, true);
|
||||
}
|
||||
|
||||
if(file_exists($out) and $replace !== true){
|
||||
|
Loading…
x
Reference in New Issue
Block a user