mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-02 21:51:49 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
dc0b27e02b
commit
9b07a78b16
1 changed files with 6 additions and 1 deletions
|
|
@ -681,6 +681,11 @@ func clearOutdatedHistoryDir(historyDir string) {
|
|||
continue
|
||||
}
|
||||
|
||||
if dirInfo.ModTime().Unix() < ago {
|
||||
removes = append(removes, filepath.Join(historyDir, dir.Name()))
|
||||
continue
|
||||
}
|
||||
|
||||
var nameTime int64
|
||||
if dirName := dirInfo.Name(); len(dirName) > len("2006-01-02-150405") {
|
||||
if t, parseErr := time.Parse("2006-01-02-150405", dirName[:len("2006-01-02-150405")]); nil == parseErr {
|
||||
|
|
@ -688,7 +693,7 @@ func clearOutdatedHistoryDir(historyDir string) {
|
|||
}
|
||||
}
|
||||
|
||||
if dirInfo.ModTime().Unix() < ago || (0 != nameTime && nameTime < ago) {
|
||||
if 0 != nameTime && nameTime < ago {
|
||||
removes = append(removes, filepath.Join(historyDir, dir.Name()))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue