split out Types.Export
This commit is contained in:
parent
e54a05612e
commit
e1f5c90c92
12 changed files with 48 additions and 33 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
3
Remote/External/Types.hs
vendored
3
Remote/External/Types.hs
vendored
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue