diff --git a/lib/mpw/mpw.rb b/lib/mpw/mpw.rb index 13c864f..b3a733c 100644 --- a/lib/mpw/mpw.rb +++ b/lib/mpw/mpw.rb @@ -59,7 +59,7 @@ class MPW when 'wallet/meta.gpg' data = decrypt(f.read) - when /^wallet\/keys\/(?.+)\.pub$/ + when %r{^wallet/keys/(?.+)\.pub$} key = Regexp.last_match('key') if GPGME::Key.find(:public, key).empty? @@ -68,10 +68,10 @@ class MPW @keys[key] = f.read - when /^wallet\/passwords\/(?[a-zA-Z0-9]+)\.gpg$/ + when %r{^wallet/passwords/(?[a-zA-Z0-9]+)\.gpg$} @passwords[Regexp.last_match('id')] = f.read - when /^wallet\/otp_keys\/(?[a-zA-Z0-9]+)\.gpg$/ + when %r{^wallet/otp_keys/(?[a-zA-Z0-9]+)\.gpg$} @otp_keys[Regexp.last_match('id')] = f.read else