diff options
author | Saku Ytti <saku@ytti.fi> | 2016-08-28 13:23:52 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2016-08-28 13:23:52 +0300 |
commit | 3b1bcbe86eb53261371b584b6655f409f80ead1b (patch) | |
tree | 2a03377c2be2261022ab72c8ddb8d99ca97fe454 | |
parent | 7bf48ca00bf0de6528e903fa63ebeb6720ae2bd5 (diff) |
expand_path in file output
so that
```
output:
file:
directory: ~/foox
```
will work
-rw-r--r-- | lib/oxidized/output/file.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |