mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Merge branch 'legacy/pm4' into stable
This commit is contained in:
@ -226,19 +226,19 @@ abstract class PluginBase implements Plugin, CommandExecutor{
|
||||
return false;
|
||||
}
|
||||
|
||||
$out = Path::join($this->dataFolder, $filename);
|
||||
if(file_exists($out) && !$replace){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(($resource = $this->getResource($filename)) === null){
|
||||
return false;
|
||||
}
|
||||
|
||||
$out = Path::join($this->dataFolder, $filename);
|
||||
if(!file_exists(dirname($out))){
|
||||
mkdir(dirname($out), 0755, true);
|
||||
}
|
||||
|
||||
if(file_exists($out) && !$replace){
|
||||
return false;
|
||||
}
|
||||
|
||||
$fp = fopen($out, "wb");
|
||||
if($fp === false) throw new AssumptionFailedError("fopen() should not fail with wb flags");
|
||||
|
||||
|
Reference in New Issue
Block a user