aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-10-01 13:13:31 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-10-01 13:13:37 +0100
commitb927252ea84d8552f4ad7a7cf12accd1d49a9ead (patch)
tree81faf4a00236709bbbdd2d7aa25720d34e8cbe54 /perllib
parent079ec0ce2a5a44df28d2535f8288e1077ca11ac0 (diff)
Do not die if old UPLOAD_DIR config given.
The new lookup would only work if it was present.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/PhotoStorage/FileSystem.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/PhotoStorage/FileSystem.pm b/perllib/FixMyStreet/PhotoStorage/FileSystem.pm
index d61a26c7a..772286d53 100644
--- a/perllib/FixMyStreet/PhotoStorage/FileSystem.pm
+++ b/perllib/FixMyStreet/PhotoStorage/FileSystem.pm
@@ -10,8 +10,8 @@ has upload_dir => (
is => 'ro',
lazy => 1,
default => sub {
- my $dir = FixMyStreet->config('PHOTO_STORAGE_OPTIONS')->{UPLOAD_DIR} ||
- FixMyStreet->config('UPLOAD_DIR');
+ my $cfg = FixMyStreet->config('PHOTO_STORAGE_OPTIONS');
+ my $dir = $cfg ? $cfg->{UPLOAD_DIR} : FixMyStreet->config('UPLOAD_DIR');
return path($dir)->absolute(FixMyStreet->path_to());
},
);