Skip to content

Commit

Permalink
Fix a race condition in ONIX::Normaliser
Browse files Browse the repository at this point in the history
* closes #1
* reported by pixelvixen
* to quote the report:

  "You will want to set the unlink_now option to true when you close the
  tempfile. The way it is right now, the file can actually be unlinked
  *after* you copy  the old file to that location."
  • Loading branch information
yob committed Jul 1, 2010
1 parent 05ef0fe commit 94cc36d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG
@@ -1,3 +1,7 @@
v0.8.3 (XXX)
- Fix for race condition in ONIX::Normaliser
- thanks to pixelvixen for reporting

v0.8.2 (6th May 2010)
- fix APAProduct#series and APAProduct#series=

Expand Down
2 changes: 1 addition & 1 deletion lib/onix/normaliser.rb
Expand Up @@ -78,7 +78,7 @@ def app_available?(app)
def next_tempfile
p = nil
Tempfile.open("onix") do |tf|
tf.close
tf.close!
p = tf.path
end
p
Expand Down

0 comments on commit 94cc36d

Please sign in to comment.