aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-04-04 17:03:36 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-04-04 17:03:36 +0100
commit7397a12408000bd252b51bf501ef052b02914a84 (patch)
tree753dca0311662bbe0f90f6f14f5407ae50ab4690
parentd84436979176d1110178fa42bcbe24113b79fd74 (diff)
Make sure fixture clears out cached photo files.
-rw-r--r--perllib/FixMyStreet/DB/Factories.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Factories.pm b/perllib/FixMyStreet/DB/Factories.pm
index 66148ad61..56cff280b 100644
--- a/perllib/FixMyStreet/DB/Factories.pm
+++ b/perllib/FixMyStreet/DB/Factories.pm
@@ -6,6 +6,7 @@ use FixMyStreet::DB;
package FixMyStreet::DB::Factories;
+use Path::Tiny;
my $db;
my $opt;
@@ -25,6 +26,7 @@ sub setup {
}
if ($opt->empty) {
+ path(FixMyStreet->path_to('web/photo'))->remove_tree({ keep_root => 1 });
$db->dbh->do(q{
DO
$func$