Skip to content
This repository
Browse code

Tempfile bug fixed

  • Loading branch information...
commit 7264ecb9ada826e0a4d46f6f3d8ba6dbcd31d187 1 parent 7911249
authored February 20, 2007
2  Changelog
... ...
@@ -1,3 +1,5 @@
  1
+Version 0.1.2
  2
+- Bugfix for Windows (Tempfile)
1 3
 - Regexes optimized (a little bit)
2 4
 
3 5
 Version 0.1.1
3  lib/mini_exiftool.rb
@@ -24,7 +24,7 @@ class MiniExiftool
24 24
   attr_reader :filename
25 25
   attr_accessor :numerical
26 26
 
27  
-  VERSION = '0.1.1'
  27
+  VERSION = '0.1.2'
28 28
 
29 29
   # opts at the moment only support :numerical for numerical values
30 30
   # (the -n parameter in the command line)
@@ -173,6 +173,7 @@ def parse_line line
173 173
   def temp_filename
174 174
     unless @temp_filename
175 175
       temp_file = Tempfile.new('mini-exiftool')
  176
+      temp_file.close
176 177
       FileUtils.cp(@filename, temp_file.path)
177 178
       @temp_filename = temp_file.path
178 179
     end
3  test/test_write.rb
@@ -12,6 +12,7 @@ class TestWrite < Test::Unit::TestCase
12 12
 
13 13
   def setup
14 14
     @temp_file = Tempfile.new('test')
  15
+    @temp_file.close
15 16
     @temp_filename = @temp_file.path
16 17
     @org_filename = File.dirname(__FILE__) + '/data/test.jpg'
17 18
     FileUtils.cp(@org_filename, @temp_filename)
@@ -20,7 +21,7 @@ def setup
20 21
   end
21 22
 
22 23
   def teardown
23  
-    @temp_file.close
  24
+    @temp_file.delete
24 25
   end
25 26
 
26 27
   def test_access_existing_tags

0 notes on commit 7264ecb

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