aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/qrcode.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/qrcode.rb')
-rw-r--r--lib/sisu/v3/qrcode.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sisu/v3/qrcode.rb b/lib/sisu/v3/qrcode.rb
index d05bf442..d668c813 100644
--- a/lib/sisu/v3/qrcode.rb
+++ b/lib/sisu/v3/qrcode.rb
@@ -166,9 +166,9 @@ WOK
end
def summarize_sources(id,file,pth,rel,url)
sys=SiSU_Env::SystemCall.new
- dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{pth}/#{file}")
- else sys.md5("#{pth}/#{file}")
- end
+ dgst=(@dg =~/^sha(?:2|256)$/) \
+ ? (sys.sha256("#{pth}/#{file}"))
+ : (sys.md5("#{pth}/#{file}"))
SiSU_Screen::Ansi.new(@md.opt.cmd,"#{dgst[1]} #{file}").warn if @md.opt.cmd =~/[vVM]/
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]