mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
FIX: cache_file storage cleanup logic was wrong
https://meta.discourse.org/t/68296
This commit is contained in:
parent
2a22b90538
commit
5f4f617689
|
@ -131,7 +131,7 @@ module FileStore
|
|||
FileUtils.mkdir_p(dir) unless Dir[dir].present?
|
||||
FileUtils.cp(file.path, path)
|
||||
# keep latest 500 files
|
||||
`ls -tr #{CACHE_DIR} | head -n +#{CACHE_MAXIMUM_SIZE} | xargs rm -f`
|
||||
`ls -tr #{CACHE_DIR} | head -n -#{CACHE_MAXIMUM_SIZE} | xargs rm -f`
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue
Block a user