summaryrefslogtreecommitdiffhomepage
path: root/keysafe.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-10-06 14:38:59 -0400
committerJoey Hess <joeyh@joeyh.name>2016-10-06 14:49:24 -0400
commit61ab8bd1f576e633a2eea4b63033c368a6645602 (patch)
tree1eacccce62019f89360a605d2c0cac72993bfa65 /keysafe.hs
parentb40d441c52f37584653e74fada9906cc8105c9f7 (diff)
downloadkeysafe-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 'keysafe.hs')
-rw-r--r--keysafe.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/keysafe.hs b/keysafe.hs
index 11f52dc..4c93251 100644
--- a/keysafe.hs
+++ b/keysafe.hs
@@ -360,7 +360,13 @@ userName = do
return $ Name $ BU8.fromString $ takeWhile (/= ',') (userGecos u)
cmdLineStorageLocations :: CmdLine.CmdLine -> IO StorageLocations
-cmdLineStorageLocations = networkStorageLocations . CmdLine.localstoragedirectory
+cmdLineStorageLocations cmdline =
+ shuffleStorageLocations (preflocs <> netlocs)
+ where
+ netlocs = networkStorageLocations lsd
+ preflocs = StorageLocations $
+ map (\mk -> mk lsd) (CmdLine.preferredStorage cmdline)
+ lsd = CmdLine.localstoragedirectory cmdline
getPasswordEntropy :: Password -> Name -> IO (Entropy UnknownPassword)
getPasswordEntropy password name = do