From 32e8f651dd5e7ceaf2e8fe1ec44ba4a65a2122bc Mon Sep 17 00:00:00 2001 From: Haruki Date: Fri, 25 Aug 2023 10:24:09 +0900 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E3=81=AB=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=81=AE=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=81=8C=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=AE?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nostrh/cmd/paths/paths.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nostrh/cmd/paths/paths.go b/nostrh/cmd/paths/paths.go index 4c400ef..4aaa3b8 100644 --- a/nostrh/cmd/paths/paths.go +++ b/nostrh/cmd/paths/paths.go @@ -14,6 +14,8 @@ func GetSettingsDirectory() (string, error) { } dirPath := filepath.Join(homeDir, BaseDirName) + + _, err = os.Stat(dirPath) if os.IsNotExist(err) { // ディレクトリが存在しない場合に作成 err = os.Mkdir(dirPath, 0700) @@ -21,7 +23,7 @@ func GetSettingsDirectory() (string, error) { return "", err } } else if err != nil { - return "", err + return "", nil } return dirPath, nil