split out Types.Export

This commit is contained in:
Joey Hess 2017-09-15 16:34:45 -04:00
parent e54a05612e
commit e1f5c90c92
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 48 additions and 33 deletions

View file

@ -12,6 +12,7 @@ module Remote.Helper.Export where
import Annex.Common
import Types.Remote
import Types.Backend
import Types.Export
import Types.Key
import Backend
import Remote.Helper.Encryptable (isEncrypted)
@ -152,12 +153,12 @@ adjustExportable r = case M.lookup "exporttree" (config r) of
-- database.
removeEmptyDirectories :: ExportActions Annex -> ExportHandle -> ExportLocation -> [Key] -> Annex Bool
removeEmptyDirectories ea db loc ks
| null (exportedDirectories loc) = return True
| null (exportDirectories loc) = return True
| otherwise = case removeExportDirectory ea of
Nothing -> return True
Just removeexportdirectory -> do
ok <- allM (go removeexportdirectory)
(reverse (exportedDirectories loc))
(reverse (exportDirectories loc))
unless ok $ liftIO $ do
-- Add back to export database, so this is
-- tried again next time.