From 8cb9381befed4174624edfc80e09185c9340b4f6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 Mar 2017 13:12:24 -0400 Subject: AssociatedFile newtype To prevent any further mistakes like 1a497cefb47557f0b4788c606f9071be422b2511 This commit was sponsored by Francois Marier on Patreon. --- Assistant/TransferSlots.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Assistant/TransferSlots.hs') diff --git a/Assistant/TransferSlots.hs b/Assistant/TransferSlots.hs index 25342f2b3..c80cf880a 100644 --- a/Assistant/TransferSlots.hs +++ b/Assistant/TransferSlots.hs @@ -153,10 +153,11 @@ genTransfer t info = case transferRemote info of -} go remote transferrer = ifM (liftIO $ performTransfer transferrer t info) ( do - maybe noop - (void . addAlert . makeAlertFiller True - . transferFileAlert direction True) - (associatedFile info) + case associatedFile info of + AssociatedFile Nothing -> noop + AssociatedFile (Just af) -> void $ + addAlert $ makeAlertFiller True $ + transferFileAlert direction True af unless isdownload $ handleDrops ("object uploaded to " ++ show remote) -- cgit v1.2.3