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

@ -19,6 +19,7 @@ import Data.Default
import Annex.Common
import Types.Remote
import Types.Export
import Types.Creds
import qualified Git
import Config.Cost

View file

@ -11,6 +11,7 @@ import Remote.External.Types
import qualified Annex
import Annex.Common
import Types.Remote
import Types.Export
import Types.CleanupActions
import Types.UrlContents
import qualified Git

View file

@ -36,7 +36,8 @@ import Types.StandardGroups (PreferredContentExpression)
import Utility.Metered (BytesProcessed(..))
import Types.Transfer (Direction(..))
import Config.Cost (Cost)
import Types.Remote (RemoteConfig, ExportLocation(..), ExportDirectory(..))
import Types.Remote (RemoteConfig)
import Types.Export
import Types.Availability (Availability(..))
import Types.Key
import Utility.Url (URLString)

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.

View file

@ -33,6 +33,7 @@ import System.Log.Logger
import Annex.Common
import Types.Remote
import Types.Export
import qualified Git
import Config
import Config.Cost

View file

@ -22,6 +22,7 @@ import Control.Monad.Catch
import Annex.Common
import Types.Remote
import Types.Export
import qualified Git
import Config
import Config.Cost

View file

@ -11,7 +11,7 @@
module Remote.WebDAV.DavLocation where
import Types
import Types.Remote (ExportLocation(..))
import Types.Export
import Annex.Locations
import Utility.Url (URLString)
#ifdef mingw32_HOST_OS