mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-03 04:15:59 +08:00
Fix: nil pointer in crontab
This commit is contained in:
@ -30,7 +30,7 @@ func collectArchiveFile() {
|
|||||||
// 列出文件
|
// 列出文件
|
||||||
root := filepath.Join(tempPath, "archive")
|
root := filepath.Join(tempPath, "archive")
|
||||||
err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
|
err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
|
||||||
if !info.IsDir() &&
|
if err != nil && !info.IsDir() &&
|
||||||
strings.HasPrefix(filepath.Base(path), "archive_") &&
|
strings.HasPrefix(filepath.Base(path), "archive_") &&
|
||||||
time.Now().Sub(info.ModTime()).Seconds() > float64(expires) {
|
time.Now().Sub(info.ModTime()).Seconds() > float64(expires) {
|
||||||
util.Log().Debug("删除过期打包下载临时文件 [%s]", path)
|
util.Log().Debug("删除过期打包下载临时文件 [%s]", path)
|
||||||
|
|||||||
Reference in New Issue
Block a user