diff options
author | Saku Ytti <saku@ytti.fi> | 2018-06-07 10:30:46 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2018-06-07 10:30:46 +0300 |
commit | 3974501038ee6673245c92e3bf0282b6591b4707 (patch) | |
tree | 29b43bfbe43fe0deab2ef3d4acbb17677d727f25 /lib | |
parent | 194b6893bde341c4fc3ba4c8041d9a6b6775a97d (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/manager.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 |