alist: fix build & apply upstream patches
This commit is contained in:
parent
4d00052697
commit
b27d9668e2
@ -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
|
||||
|
33
alist/patches/001-fix-error-if-use-abs-temp-path.patch
Normal file
33
alist/patches/001-fix-error-if-use-abs-temp-path.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 4af91241627909fcf34cc6e4f7abd32a2781f321 Mon Sep 17 00:00:00 2001
|
||||
From: Noah Hsu <i@nn.ci>
|
||||
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)
|
||||
}
|
Loading…
Reference in New Issue
Block a user