diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sisu/v0/sysenv.rb | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 8bf805be..329c9111 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -536,7 +536,10 @@ module SiSU_Env        program='openssl'        program_ref="\n\t\tmd5 digest requested"        if program_found?(program) -        dgst=%x{openssl dgst -md5 #{filename}}.strip +        pwd=Dir.pwd +        Dir.chdir(File.dirname(filename)) +        dgst=%x{openssl dgst -md5 #{File.basename(filename)}}.strip #use file name without file path +        Dir.chdir(pwd)          dgst.scan(/\S+/)        else puts "\tWARN: #{program} is not installed #{program_ref}"               #if @cmd =~/v/          false @@ -546,7 +549,9 @@ module SiSU_Env        program='openssl'        program_ref="\n\t\tsha digest requested"        if program_found?(program) -        dgst=%x{openssl dgst -sha256 #{filename}}.strip +        Dir.chdir(File.dirname(filename)) +        dgst=%x{openssl dgst -sha256 #{File.basename(filename)}}.strip #use file name without file path +        Dir.chdir(pwd)          dgst.scan(/\S+/)        else puts "\tWARN: #{program} is not installed #{program_ref}"               #if @cmd =~/v/          false | 
