summaryrefslogtreecommitdiffhomepage
path: root/Storage/Local.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Storage/Local.hs')
-rw-r--r--Storage/Local.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Storage/Local.hs b/Storage/Local.hs
index 6dcaaae..a79cc43 100644
--- a/Storage/Local.hs
+++ b/Storage/Local.hs
@@ -5,6 +5,7 @@
module Storage.Local
( localStorage
+ , localStorageOverride
, storageDir
, storageTopDir
, testStorageDir
@@ -49,6 +50,9 @@ localStorage storagelevel getsharedir n = Storage
where
section = Section n
+localStorageOverride :: FilePath -> Storage
+localStorageOverride d = localStorage LocallyPreferred (\_ -> pure d) ""
+
store :: Section -> GetShareDir -> StorableObjectIdent -> Share -> IO StoreResult
store section getsharedir i s = onError (StoreFailure . show) $ do
dir <- getsharedir section