From a5744b206cf1ca811f913d68cafc0178079be2f7 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 13 Dec 2012 20:23:23 +0000 Subject: Remove any download zip files when a request's cached files are expired. --- app/controllers/admin_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers/admin_controller.rb') diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index d7933b212..d93e68dab 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -28,6 +28,10 @@ class AdminController < ApplicationController cache_subpath = foi_fragment_cache_all_for_request(info_request) FileUtils.rm_rf(cache_subpath) + # Remove any download zips + download_dir = request_download_zip_dir(info_request) + FileUtils.rm_rf(download_dir) + # Remove the database caches of body / attachment text (the attachment text # one is after privacy rules are applied) info_request.clear_in_database_caches! -- cgit v1.2.3