From e228de6ebe75df63f8daaf59beb185cbbbe4acbc Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 19 Sep 2016 16:44:43 -0400 Subject: [PATCH] detect relative path for ZM_PATH_EVENTS and use ZM_PATH_WEB to make a full path --- scripts/ZoneMinder/lib/ZoneMinder/Storage.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Storage.pm b/scripts/ZoneMinder/lib/ZoneMinder/Storage.pm index 52571fef8..34158b9e4 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Storage.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Storage.pm @@ -96,7 +96,7 @@ sub Path { $_[0]{Path} = $_[1]; } if ( ! ( $_[0]{Id} or $_[0]{Path} ) ) { - $_[0]{Path} = $Config{ZM_DIR_EVENTS}; + $_[0]{Path} = ($Config{ZM_DIR_EVENTS}=~/^\//) ? $Config{ZM_DIR_EVENTS} : ($Config{ZM_PATH_WEB}.'/'.$Config{ZM_DIR_EVENTS}) } return $_[0]{Path}; } # end sub Path