delete overhead mkdir0777

This commit is contained in:
legiz-ru
2025-09-25 09:52:17 +03:00
committed by GitHub
parent 70c83da66a
commit aa64a48db2
-8
View File
@@ -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));
}