From f8231ade9124faa3e7b517d2a7e76085ac84b562 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 14 Sep 2016 14:29:58 -0400 Subject: Warn when --uploadqueued fails to upload to servers. --- keysafe.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'keysafe.hs') diff --git a/keysafe.hs b/keysafe.hs index 33ea1a2..04f2d9b 100644 --- a/keysafe.hs +++ b/keysafe.hs @@ -62,8 +62,11 @@ dispatch cmdline ui storagelocations tunables possibletunables = do =<< Gpg.getKeyToBackup ui go CmdLine.Restore Nothing = restore cmdline storagelocations ui possibletunables Gpg.anyKey - go CmdLine.UploadQueued _ = - uploadQueued (CmdLine.localstoragedirectory cmdline) + go CmdLine.UploadQueued _ = do + problems <- uploadQueued (CmdLine.localstoragedirectory cmdline) + if null problems + then return () + else showError ui ("Problem uploading queued data to servers:\n\n" ++ unlines problems ++ "\n\nYour secret keys have not yet been backed up.") go (CmdLine.Server) _ = runServer (CmdLine.localstoragedirectory cmdline) -- cgit v1.2.3