summaryrefslogtreecommitdiff
path: root/lib/oxidized/source
diff options
context:
space:
mode:
authorMichael Baker <elmobp@users.noreply.github.com>2017-11-23 06:18:41 +0800
committerNeil Lathwood <neil@lathwood.co.uk>2017-11-22 22:18:41 +0000
commitda8923512737f0d9383feaebaf43e781e914b71e (patch)
tree478c0abc3bdc8217765a0fc55b0b6d0104386726 /lib/oxidized/source
parentc81881d2cd42f02b30bd36740745a78e6106afa8 (diff)
fix: GPG bug fix when loading file (#1109)
* GPG bug fix * Update Sources.md * Update README.md
Diffstat (limited to 'lib/oxidized/source')
-rw-r--r--lib/oxidized/source/csv.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/source/csv.rb b/lib/oxidized/source/csv.rb
index c1e310a..27cb49e 100644
--- a/lib/oxidized/source/csv.rb
+++ b/lib/oxidized/source/csv.rb
@@ -21,9 +21,9 @@ class CSV < Source
def load
nodes = []
file = File.expand_path(@cfg.file)
- file = if @cfg.gpg?
+ if @cfg.gpg?
crypto = GPGME::Crypto.new password: @cfg.gpg_password
- crypto.decrypt(file).to_s
+ file = crypto.decrypt(File.open(file)).to_s
else
open(file)
end