From 3974501038ee6673245c92e3bf0282b6591b4707 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Thu, 7 Jun 2018 10:30:46 +0300 Subject: Fix local file loading Local files could never be loaded, as the name does not contain file extension, so check for their existance would always fail. --- lib/oxidized/manager.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/oxidized/manager.rb b/lib/oxidized/manager.rb index e4a1d7c..892cdfc 100644 --- a/lib/oxidized/manager.rb +++ b/lib/oxidized/manager.rb @@ -56,10 +56,10 @@ module Oxidized private # try to load locally defined file, instead of upstream provided - def local_load dir, file + def local_load dir, name dir = File.join(Config::Root, dir) - return false unless File.exist? File.join(dir, file) - Manager.load dir, file + return false unless File.exist? File.join(dir, name + ".rb") + Manager.load dir, name end end end -- cgit v1.2.1