better support for mixed content

This commit is contained in:
Régis Hanol
2015-06-01 17:49:58 +02:00
parent 67cc96f20d
commit 81a699e2b0
5 changed files with 23 additions and 25 deletions

View File

@@ -104,7 +104,7 @@ module FileStore
dir = File.dirname(path)
FileUtils.mkdir_p(dir) unless Dir[dir].present?
FileUtils.cp(file.path, path)
# keep up to 500 files
# keep latest 500 files
`ls -tr #{CACHE_DIR} | head -n +#{CACHE_MAXIMUM_SIZE} | xargs rm -f`
end