Allow saving resources with parent directory being recursively created

This commit is contained in:
PEMapModder 2015-08-18 10:20:04 +08:00
parent f1cc8ddde4
commit 4e0fc6d1de

View File

@ -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){