From 6f6fc8b2d15b253bd455661a38d41ece11a547c0 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 10 Aug 2016 12:42:24 +0100 Subject: Make UPLOAD_DIR/GEO_CACHE relative to project root If they are absolute already, do nothing. Switch a couple of uses to Path::Tiny as well. --- perllib/FixMyStreet/App/Model/PhotoSet.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Model/PhotoSet.pm') diff --git a/perllib/FixMyStreet/App/Model/PhotoSet.pm b/perllib/FixMyStreet/App/Model/PhotoSet.pm index 487786a3b..46e1fb630 100644 --- a/perllib/FixMyStreet/App/Model/PhotoSet.pm +++ b/perllib/FixMyStreet/App/Model/PhotoSet.pm @@ -68,7 +68,7 @@ has upload_dir => ( lazy => 1, default => sub { my $self = shift; - my $cache_dir = path( FixMyStreet->config('UPLOAD_DIR') ); + my $cache_dir = path(FixMyStreet->config('UPLOAD_DIR'))->absolute(FixMyStreet->path_to()); $cache_dir->mkpath; unless ( -d $cache_dir && -w $cache_dir ) { warn "Can't find/write to photo cache directory '$cache_dir'"; -- cgit v1.2.3