-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* When the user cache is not set properly, Clear the cache directory operation will be very dangerous
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
alist/patches/0001-Revert-feat-clear-temp-file-while-start.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From fdcb81f6ba8b8d7546a6742e9566487e12815499 Mon Sep 17 00:00:00 2001 | ||
From: sbwml <admin@cooluc.com> | ||
Date: Thu, 28 Apr 2022 11:10:53 +0800 | ||
Subject: [PATCH] Revert "feat: clear temp file while start" | ||
|
||
This reverts commit 24d031d57875d3c6a9624fa7334c6eac1c9111fb. | ||
--- | ||
bootstrap/conf.go | 7 +------ | ||
1 file changed, 1 insertion(+), 6 deletions(-) | ||
|
||
diff --git a/bootstrap/conf.go b/bootstrap/conf.go | ||
index 5c9a1b3..f4d87d4 100644 | ||
--- a/bootstrap/conf.go | ||
+++ b/bootstrap/conf.go | ||
@@ -7,7 +7,6 @@ import ( | ||
log "github.com/sirupsen/logrus" | ||
"io/ioutil" | ||
"os" | ||
- "path/filepath" | ||
) | ||
|
||
// InitConf init config | ||
@@ -47,11 +46,7 @@ func InitConf() { | ||
if !conf.Conf.Force { | ||
confFromEnv() | ||
} | ||
- 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: %s", err.Error()) | ||
} | ||
-- | ||
2.34.1 | ||
|