mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-15 16:05:28 +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;
|
$out = $this->dataFolder . $filename;
|
||||||
if(!file_exists($this->dataFolder)){
|
if(!file_exists(dirname($out))){
|
||||||
mkdir($this->dataFolder, 0755, true);
|
mkdir(dirname($out), 0755, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(file_exists($out) and $replace !== true){
|
if(file_exists($out) and $replace !== true){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user