Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tempfile bug fixed

  • Loading branch information...
commit 7264ecb9ada826e0a4d46f6f3d8ba6dbcd31d187 1 parent 7911249
Jan Friedrich authored
Showing with 6 additions and 2 deletions.
  1. +2 −0  Changelog
  2. +2 −1  lib/mini_exiftool.rb
  3. +2 −1  test/test_write.rb
View
2  Changelog
@@ -1,3 +1,5 @@
+Version 0.1.2
+- Bugfix for Windows (Tempfile)
- Regexes optimized (a little bit)
Version 0.1.1
View
3  lib/mini_exiftool.rb
@@ -24,7 +24,7 @@ class MiniExiftool
attr_reader :filename
attr_accessor :numerical
- VERSION = '0.1.1'
+ VERSION = '0.1.2'
# opts at the moment only support :numerical for numerical values
# (the -n parameter in the command line)
@@ -173,6 +173,7 @@ def parse_line line
def temp_filename
unless @temp_filename
temp_file = Tempfile.new('mini-exiftool')
+ temp_file.close
FileUtils.cp(@filename, temp_file.path)
@temp_filename = temp_file.path
end
View
3  test/test_write.rb
@@ -12,6 +12,7 @@ class TestWrite < Test::Unit::TestCase
def setup
@temp_file = Tempfile.new('test')
+ @temp_file.close
@temp_filename = @temp_file.path
@org_filename = File.dirname(__FILE__) + '/data/test.jpg'
FileUtils.cp(@org_filename, @temp_filename)
@@ -20,7 +21,7 @@ def setup
end
def teardown
- @temp_file.close
+ @temp_file.delete
end
def test_access_existing_tags

0 comments on commit 7264ecb

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