From 5579aaec8e33151faed86c71ed583ca2f1ac19ef Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 15 Jun 2018 03:10:22 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hook/hook.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hook/hook.php b/hook/hook.php index 79403af..d389b08 100644 --- a/hook/hook.php +++ b/hook/hook.php @@ -21,6 +21,8 @@ exec("git ls-files -z ../icons", $raw_img_list); $raw_img_list = explode("\x00", $raw_img_list[0]); $img_list = []; +$tmp_img_list = []; + foreach ($raw_img_list as $path) { $pos = strpos($path, '../icons/'); if($pos === false){ @@ -28,6 +30,8 @@ foreach ($raw_img_list as $path) { } $path = substr($path, $pos + 9); + $tmp_img_list[] = $path; + $pathinfo = pathinfo($path); $dpath = $pathinfo['dirname']; $basename = $pathinfo['basename']; @@ -40,6 +44,6 @@ foreach ($raw_img_list as $path) { $img_list[$dpath][$filename] = $basename; } -file_put_contents('tmp.txt', json_encode($raw_img_list)); +file_put_contents('tmp.txt', json_encode($tmp_img_list)); file_put_contents('list.json', json_encode($img_list));