diff options
Diffstat (limited to 'Command/Add.hs')
-rw-r--r-- | Command/Add.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/Add.hs b/Command/Add.hs index b532ab045..29a1518e8 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -34,19 +34,19 @@ start :: CommandStartBackendFile start pair@(file, _) = notAnnexed file $ do s <- liftIO $ getSymbolicLinkStatus file if (isSymbolicLink s) || (not $ isRegularFile s) - then return Nothing + then stop else do showStart "add" file - return $ Just $ perform pair + next $ perform pair perform :: BackendFile -> CommandPerform perform (file, backend) = do stored <- Backend.storeFileKey file backend case stored of - Nothing -> return Nothing + Nothing -> stop Just (key, _) -> do moveAnnex key file - return $ Just $ cleanup file key + next $ cleanup file key cleanup :: FilePath -> Key -> CommandCleanup cleanup file key = do |