Revision 8f44fd3a 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 82

  
77 83
        public WorkflowAgent()
78 84
        {
......
245 251
                var pendingStates = pendingEntries
246 252
                    .Select(state => new WorkflowState(account, state))
247 253
                    .ToList();
248

  
254
                
255
                                
249 256
                if (Log.IsDebugEnabled)
250 257
                    Log.DebugFormat("Found {0} interrupted files", pendingStates.Count);
251 258

  
......
266 273
                return;*/
267 274
            //TODO: Need to handle folder renames            
268 275

  
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
281
            {
282
                Log.InfoFormat("File skipped, not under a selected folder [{0}] ",workflowState.Path);
283
                return;
284
            }
285

  
286

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

  
271 289
            _agent.Post(workflowState);

Also available in: Unified diff