assistant: Now honors preferred content settings when deciding what to transfer.
Both when queueing downloads, and uploads, consults the preferred content settings. I didn't make it check yet when requeing failed transfers or queuing deferred downloads; dealing with the preferred content settings (or indeed, other settings) changing while the assistant is running still needs work.
This commit is contained in:
parent
11f8ea2f34
commit
5ac15149cc
7 changed files with 36 additions and 28 deletions
|
@ -10,7 +10,6 @@ module Annex.Wanted where
|
|||
import Common.Annex
|
||||
import Logs.PreferredContent
|
||||
import Git.FilePath
|
||||
import qualified Annex
|
||||
import Annex.UUID
|
||||
import Types.Remote
|
||||
|
||||
|
@ -24,9 +23,9 @@ wantGet (Just file) = do
|
|||
isPreferredContent Nothing S.empty fp
|
||||
|
||||
{- Check if a file is preferred content for a remote. -}
|
||||
wantSend :: UUID -> AssociatedFile -> Annex Bool
|
||||
wantSend _ Nothing = return True
|
||||
wantSend to (Just file) = do
|
||||
wantSend :: AssociatedFile -> UUID -> Annex Bool
|
||||
wantSend Nothing _ = return True
|
||||
wantSend (Just file) to = do
|
||||
fp <- inRepo $ toTopFilePath file
|
||||
isPreferredContent (Just to) S.empty fp
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue