summaryrefslogtreecommitdiff
path: root/lib/pstore.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pstore.rb')
-rw-r--r--lib/pstore.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 4a3434b..23b2d87 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -95,8 +95,7 @@ class PStore
file.flock(read_only ? File::LOCK_SH : File::LOCK_EX)
if read_only
@table = Marshal::load(file)
- elsif orig
- content = file.read
+ elsif orig and (content = file.read) != nil
@table = Marshal::load(content)
size = content.size
md5 = Digest::MD5.digest(content)