diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-10-06 14:38:59 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-10-06 14:49:24 -0400 |
commit | 61ab8bd1f576e633a2eea4b63033c368a6645602 (patch) | |
tree | 1eacccce62019f89360a605d2c0cac72993bfa65 /Storage/Local.hs | |
parent | b40d441c52f37584653e74fada9906cc8105c9f7 (diff) | |
download | keysafe-61ab8bd1f576e633a2eea4b63033c368a6645602.tar.gz |
New --add-storage-directory and --add-server options
* New --add-storage-directory and --add-server options, which can be used
to make keysafe backup/restore using additional locations.
* Removed --store-local option; use --add-storage-directory instead.
This commit was sponsored by Thomas Hochstein on Patreon.
Diffstat (limited to 'Storage/Local.hs')
-rw-r--r-- | Storage/Local.hs | 4 |
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 |