From a3834e558cf6ae04826b44e65a02ee22286f7952 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Aug 2016 20:44:07 -0400 Subject: write via temp file avoids short reads, and also if a backup program came along while the write was happening, avoids short backups --- Storage.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Storage.hs') diff --git a/Storage.hs b/Storage.hs index 275f3fe..fc9e9ed 100644 --- a/Storage.hs +++ b/Storage.hs @@ -11,7 +11,8 @@ data Storage = Storage { storeShard :: StorableObjectIdent -> Shard -> IO StoreResult , retrieveShard :: ShardNum -> StorableObjectIdent -> IO RetrieveResult , obscureShards :: IO ObscureResult - -- ^ run after making some changes, to avoid correlation attacks + -- ^ run after making some calls to storeShard/retrieveShard, + -- to avoid correlation attacks } data StoreResult = StoreSuccess | StoreFailure String -- cgit v1.2.3