summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/pstore.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 05fa5dccc73..409fc6dfc01 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -88,14 +88,14 @@ class PStore
file = File::open(@filename, "r+")
orig = true
else
+ @table = {}
file = File::open(@filename, "w+")
+ Marshal::dump(@table, file)
end
file.flock(File::LOCK_EX)
if orig
File::copy @filename, backup
@table = Marshal::load(file)
- else
- @table = {}
end
begin
catch(:pstore_abort_transaction) do