diff --git a/alist/Makefile b/alist/Makefile index e376ebf..d5a5be4 100644 --- a/alist/Makefile +++ b/alist/Makefile @@ -37,8 +37,7 @@ GO_PKG:=github.com/alist-org/alist GO_PKG_LDFLAGS:=-w -s GO_PKG_LDFLAGS_X:= \ $(PKG_ALIST).Version=v$(PKG_VERSION)-$(ARCH) \ - $(PKG_ALIST).WebVersion=$(PKG_WEB_VERSION) \ - $(PKG_ALIST).BuiltAt=$(shell date "+%F %T %z") + $(PKG_ALIST).WebVersion=$(PKG_WEB_VERSION) include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk diff --git a/alist/patches/001-fix-error-if-use-abs-temp-path.patch b/alist/patches/001-fix-error-if-use-abs-temp-path.patch new file mode 100644 index 0000000..70358d3 --- /dev/null +++ b/alist/patches/001-fix-error-if-use-abs-temp-path.patch @@ -0,0 +1,33 @@ +From 4af91241627909fcf34cc6e4f7abd32a2781f321 Mon Sep 17 00:00:00 2001 +From: Noah Hsu +Date: Fri, 9 Sep 2022 18:50:54 +0800 +Subject: [PATCH] fix: error if use abs temp path (close #1624) + +--- + internal/bootstrap/config.go | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/internal/bootstrap/config.go b/internal/bootstrap/config.go +index ad9f64926..3e72a98fd 100644 +--- a/internal/bootstrap/config.go ++++ b/internal/bootstrap/config.go +@@ -48,16 +48,14 @@ func InitConfig() { + confFromEnv() + } + // convert abs path +- var absPath string +- var err error + if !filepath.IsAbs(conf.Conf.TempDir) { +- absPath, err = filepath.Abs(conf.Conf.TempDir) ++ absPath, err := filepath.Abs(conf.Conf.TempDir) + if err != nil { + log.Fatalf("get abs path error: %+v", err) + } ++ conf.Conf.TempDir = absPath + } +- conf.Conf.TempDir = absPath +- err = os.RemoveAll(filepath.Join(conf.Conf.TempDir)) ++ err := os.RemoveAll(filepath.Join(conf.Conf.TempDir)) + if err != nil { + log.Errorln("failed delete temp file:", err) + }