delete overhead mkdir0777
This commit is contained in:
@@ -1853,10 +1853,6 @@ class Bot
|
||||
if (array_key_exists('hwid', $json)) {
|
||||
$out[] = 'update hwid devices';
|
||||
$this->update($this->input['chat'], $this->input['message_id'], implode("\n", $out));
|
||||
$dir = dirname($this->hwid);
|
||||
if (!is_dir($dir)) {
|
||||
mkdir($dir, 0777, true);
|
||||
}
|
||||
$data = is_array($json['hwid']) ? $json['hwid'] : [];
|
||||
file_put_contents($this->hwid, json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
|
||||
}
|
||||
@@ -4852,10 +4848,6 @@ DNS-over-HTTPS with IP:
|
||||
|
||||
public function setHwidStorage(array $storage)
|
||||
{
|
||||
$dir = dirname($this->hwid);
|
||||
if (!is_dir($dir)) {
|
||||
mkdir($dir, 0777, true);
|
||||
}
|
||||
file_put_contents($this->hwid, json_encode($storage, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user