mirror of
https://github.com/cirruslabs/tart.git
synced 2026-10-03 12:46:26 +02:00
Fix prune --older-than deleting all cache (#549)
* Fix `prune --older-than` * Update Sources/tart/Commands/Prune.swift Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com> --------- Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
This commit is contained in:
co-authored by
Fedor Korotkov
parent
63b74f407b
commit
8653ca4115
@@ -34,7 +34,7 @@ struct Prune: AsyncParsableCommand {
|
||||
// Clean up cache entries based on last accessed date
|
||||
if let olderThan = olderThan {
|
||||
let olderThanInterval = Int(exactly: olderThan)!.days.timeInterval
|
||||
let olderThanDate = Date().addingTimeInterval(olderThanInterval)
|
||||
let olderThanDate = Date() - olderThanInterval
|
||||
|
||||
try Prune.pruneOlderThan(olderThanDate: olderThanDate)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user