From 3b1bcbe86eb53261371b584b6655f409f80ead1b Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sun, 28 Aug 2016 13:23:52 +0300 Subject: expand_path in file output so that ``` output: file: directory: ~/foox ``` will work --- lib/oxidized/output/file.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/output/file.rb') diff --git a/lib/oxidized/output/file.rb b/lib/oxidized/output/file.rb index bb13827..0b64447 100644 --- a/lib/oxidized/output/file.rb +++ b/lib/oxidized/output/file.rb @@ -17,7 +17,7 @@ class OxidizedFile < Output end def store node, outputs, opt={} - file = @cfg.directory + file = File.expand_path @cfg.directory if opt[:group] file = File.join File.dirname(file), opt[:group] end @@ -28,7 +28,7 @@ class OxidizedFile < Output end def fetch node, group - cfg_dir = @cfg.directory + cfg_dir = File.expand_path @cfg.directory if group # group is explicitly defined by user IO.readlines File.join(cfg_dir, group, node) else -- cgit v1.2.1