Skip to content
Browse files

Fix escaping of values for older versions of Shellwords.

  • Loading branch information...
1 parent b62af6a commit 70eb91158ce8a89d39a3d7bbfc3feae9f55ada1a @janfri committed
Showing with 5 additions and 2 deletions.
  1. +3 −0 Changelog
  2. +2 −2 lib/mini_exiftool.rb
View
3 Changelog
@@ -1,3 +1,6 @@
+v1.4.4
+- Fix escaping of values for older versions of Shellwords.
+
v1.4.3
- Fixing rubyforge bug [#29596] (Quotes in values)
Thanks to Michael Grove for reporting
View
4 lib/mini_exiftool.rb
@@ -32,7 +32,7 @@ class MiniExiftool
attr_reader :filename
attr_accessor :numerical, :composite, :convert_encoding, :errors, :timestamps
- VERSION = '1.4.3'
+ VERSION = '1.4.4'
# +opts+ support at the moment
# * <code>:numerical</code> for numerical values, default is +false+
@@ -154,7 +154,7 @@ def save
arr_val.map! {|e| convert e}
tag_params = ''
arr_val.each do |v|
- tag_params << %Q(-#{original_tag}=#{Shellwords.escape(v)} )
+ tag_params << %Q(-#{original_tag}=#{Shellwords.escape(v.to_s)} )
end
opt_params = ''
opt_params << (arr_val.detect {|x| x.kind_of?(Numeric)} ? '-n ' : '')

0 comments on commit 70eb911

Please sign in to comment.
Something went wrong with that request. Please try again.