From c1e117b3ebb6983100d2e99c2ffb373a275b1e16 Mon Sep 17 00:00:00 2001 From: fengxxc Date: Mon, 26 Feb 2024 13:01:16 +0800 Subject: [PATCH] fix: create image permission denied in linux (change mkdir permission bits to 0755) --- Makefile | 2 +- format/format.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cd7e0e3..91d67e1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ BUILD_ENV := CGO_ENABLED=0 APP=wechatmp2markdown -VERSION=v1.1.5 +VERSION=v1.1.6 # linux or mac 环境编译 # make [cmd] diff --git a/format/format.go b/format/format.go index 4914078..ba2bc4f 100644 --- a/format/format.go +++ b/format/format.go @@ -92,7 +92,7 @@ func FormatAndSave(article parse.Article, filePath string) error { // make basePath dir if not exists if _, err := os.Stat(basePath); err != nil { - if err := os.MkdirAll(basePath, 0644); err != nil { + if err := os.MkdirAll(basePath, 0755); err != nil { panic(err) } }