diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-09-29 17:21:05 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-09-29 17:21:05 +0100 |
commit | edb9349774793c6d1925c3e802a8ba4703b9a585 (patch) | |
tree | fd87d5dc4f338fcba0c812fd1230544f371c6601 /lib/sisu | |
parent | Merge branch 'upstream' into debian/sid (diff) | |
parent | hash test now will return only filename, no path, man page and man2html update (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu')
-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 |