summaryrefslogtreecommitdiffhomepage
path: root/Storage/Local.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-10-06 13:54:52 -0400
committerJoey Hess <joeyh@joeyh.name>2016-10-06 13:54:52 -0400
commitb40d441c52f37584653e74fada9906cc8105c9f7 (patch)
tree737396d6ab61212cad52555c7bc99dedd167b330 /Storage/Local.hs
parent54d3bfbb98958cb49399f1a7f092fa43593ef4c8 (diff)
downloadkeysafe-b40d441c52f37584653e74fada9906cc8105c9f7.tar.gz
move level from Server to Storage
This allows local storage locations to have levels too, and also get shuffled nicely. This commit was sponsored by Ethan Aubin.
Diffstat (limited to 'Storage/Local.hs')
-rw-r--r--Storage/Local.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Storage/Local.hs b/Storage/Local.hs
index e061831..6dcaaae 100644
--- a/Storage/Local.hs
+++ b/Storage/Local.hs
@@ -35,13 +35,14 @@ type GetShareDir = Section -> IO FilePath
newtype Section = Section String
-localStorage :: GetShareDir -> String -> Storage
-localStorage getsharedir n = Storage
+localStorage :: StorageLevel -> GetShareDir -> String -> Storage
+localStorage storagelevel getsharedir n = Storage
{ storeShare = store section getsharedir
, retrieveShare = retrieve section getsharedir
, obscureShares = obscure section getsharedir
, countShares = count section getsharedir
, moveShares = move section getsharedir
+ , storageLevel = storagelevel
, uploadQueue = Nothing
, getServer = Nothing
}