Commit b3e320c6 authored by Euan游根明's avatar Euan游根明

perf: 优化获取文件路径

parent abeed4d8
...@@ -259,15 +259,13 @@ class Nacos ...@@ -259,15 +259,13 @@ class Nacos
*/ */
public static function getPath($path,$fileName){ public static function getPath($path,$fileName){
if (!file_exists($path)) { $file = $path.$fileName;
if (!file_exists($file)) {
mkdir($path, 0775, true); mkdir($path, 0775, true);
touch($path.$fileName); touch($file);
} chmod($file, 0775);
if (!file_exists($path.$fileName)) {
touch($path.$fileName);
} }
return $path.$fileName; return $file;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment