Revision 2341c603 trunk/Pithos.Core/Agents/WorkflowAgent.cs

b/trunk/Pithos.Core/Agents/WorkflowAgent.cs
73 73
        [System.ComponentModel.Composition.Import]
74 74
        public IPithosSettings Settings { get; set; }
75 75

  
76
        private List<string> _selectivePaths = new List<string>();
77
        public List<string> SelectivePaths
78
        {
79
            get { return _selectivePaths; }
80
            set { _selectivePaths = value; }
81
        }
76
        [System.ComponentModel.Composition.Import]
77
        public Selectives Selectives { get; set; }
82 78

  
83 79
        public WorkflowAgent()
84 80
        {
......
273 269
                return;*/
274 270
            //TODO: Need to handle folder renames            
275 271

  
276
            //If there are selective sync paths defined
277
            if (SelectivePaths.Count > 0
278
                //And the target file is not below any of the selective paths
279
                && !SelectivePaths.Any(workflowState.Path.IsAtOrDirectlyBelow))
280
            //abort the post
272

  
273
            if (!Selectives.IsSelected(workflowState.AccountInfo, workflowState.Path))
281 274
            {
282
                Log.InfoFormat("File skipped, not under a selected folder [{0}] ",workflowState.Path);
275
                Log.InfoFormat("File skipped, not under a selected folder [{0}] ", workflowState.Path);
283 276
                return;
284 277
            }
285 278

  
286

  
287 279
            Debug.Assert(workflowState.Path.StartsWith(workflowState.AccountInfo.AccountPath, StringComparison.InvariantCultureIgnoreCase), "File from wrong account posted");
288 280

  
289 281
            _agent.Post(workflowState);

Also available in: Unified diff