--RMedoP2+Pr6Rq0N2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
This patch fixes the possibility of reading from a freshly
created/truncated pstore file. Comments? -sc
--
Sean Chittenden
--RMedoP2+Pr6Rq0N2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: lib/pstore.rb
RCS file: /src/ruby/lib/pstore.rb,v
retrieving revision 1.13
diff -u -u -r1.13 pstore.rb
--- lib/pstore.rb 2001/12/01 14:03:19 1.13
+++ lib/pstore.rb 2002/06/20 13:32:23
@@ -97,10 +97,14 @@
@table arshal::load(file)
elsif orig
content ile.read
- @table arshal::load(content)
- size ontent.size
- md5 igest::MD5.digest(content)
- content il # unreference huge data
+ unless content.nil?
+ @table arshal::load(content)
+ size ontent.size
+ md5 igest::MD5.digest(content)
+ content il # unreference huge data
+ else
+ @table }
+ end
else
@table }
end
--RMedoP2+Pr6Rq0N2--