alist: patch: disable delete of temp directory at startup

* It's not good idea on the openwrt platform
This commit is contained in:
sbwml 2022-09-12 12:40:08 +08:00
parent 5e9bb57535
commit 2873eb5fa7

View File

@ -0,0 +1,15 @@
--- a/internal/bootstrap/config.go
+++ b/internal/bootstrap/config.go
@@ -55,11 +55,7 @@ func InitConfig() {
}
conf.Conf.TempDir = absPath
}
- err := os.RemoveAll(filepath.Join(conf.Conf.TempDir))
- if err != nil {
- log.Errorln("failed delete temp file:", err)
- }
- err = os.MkdirAll(conf.Conf.TempDir, 0700)
+ err := os.MkdirAll(conf.Conf.TempDir, 0700)
if err != nil {
log.Fatalf("create temp dir error: %+v", err)
}