Skip to content

Commit

Permalink
no directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryang20718 committed Dec 27, 2023
1 parent 4785ede commit 7677214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bazel_disk_cache_cleaner/bazel_disk_cache_cleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func main() {
}
}
timeKeepFilesAccessedDays := time.Duration(KeepFilesAccessedDays) * 24 * time.Hour
if accessTime.Add(timeKeepFilesAccessedDays).Before(time.Now()) && path != BazelCacheDir {
if accessTime.Add(timeKeepFilesAccessedDays).Before(time.Now()) && path != BazelCacheDir && !info.IsDir() {
// Check if Access time is greater than desired days to keep
// don't delete cache dir, otherwise you'll have to purge bazel cache completely
fileList = append(fileList, path)
Expand Down

0 comments on commit 7677214

Please sign in to comment.