aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Model/PhotoSet.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-08-10 12:42:24 +0100
committerMatthew Somerville <matthew@mysociety.org>2016-08-10 12:42:24 +0100
commit6f6fc8b2d15b253bd455661a38d41ece11a547c0 (patch)
tree77bddd693a6de069e67c9a8eabad7b78931067ae /perllib/FixMyStreet/App/Model/PhotoSet.pm
parente5d85c495f28be97b8f94487dee26646dcd13ebb (diff)
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.
Diffstat (limited to 'perllib/FixMyStreet/App/Model/PhotoSet.pm')
-rw-r--r--perllib/FixMyStreet/App/Model/PhotoSet.pm2
1 files changed, 1 insertions, 1 deletions
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'";