diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-11 20:44:07 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-11 20:44:07 -0400 |
commit | a3834e558cf6ae04826b44e65a02ee22286f7952 (patch) | |
tree | 571159729a9392579aa993e3f3da8dd58745c0b3 /Storage.hs | |
parent | ab3594dacb0461ae5e253544f65c3e3d50eb721d (diff) | |
download | keysafe-a3834e558cf6ae04826b44e65a02ee22286f7952.tar.gz |
write via temp file
avoids short reads, and also if a backup program came along while the write
was happening, avoids short backups
Diffstat (limited to 'Storage.hs')
-rw-r--r-- | Storage.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |