Method: BugFix::Tempfile.callback
- Defined in:
- lib/pik/contrib/zip/tempfile_bugfixed.rb
.callback(data) ⇒ Object
:nodoc:
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/pik/contrib/zip/tempfile_bugfixed.rb', line 144 def callback(data) # :nodoc: pid = $$ lambda{ if pid == $$ path, tmpfile, cleanlist = *data print "removing ", path, "..." if $DEBUG tmpfile.close if tmpfile # keep this order for thread safeness File.unlink(path) if File.exist?(path) cleanlist.delete(path) if cleanlist print "done\n" if $DEBUG end } end |