Revision 8f44fd3a trunk/Pithos.Core/Agents/StatusAgent.cs

b/trunk/Pithos.Core/Agents/StatusAgent.cs
346 346
                        command.Parameters.AddWithValue("path", path);
347 347
                        
348 348
                        var affected = command.ExecuteNonQuery();
349
                        if (affected == 0)
350
                        {
351
                            var createdState = FileState.CreateFor(FileInfoExtensions.FromPath(path));
352
                            createdState.FileStatus = status;
353
                            _persistenceAgent.Post(createdState.Create);
354
                        }
349 355
                        return affected;
350 356
                    }
351 357
                }
......
379 385
                        command.Parameters.AddWithValue("overlayStatus", overlayStatus);
380 386
                        
381 387
                        var affected = command.ExecuteNonQuery();
388
                        if (affected == 0)
389
                        {
390
                            var createdState=FileState.CreateFor(FileInfoExtensions.FromPath(absolutePath));
391
                            createdState.FileStatus = fileStatus;
392
                            createdState.OverlayStatus = overlayStatus;
393
                            _persistenceAgent.Post(createdState.Create);  
394
                        }
382 395
                        return affected;
383 396
                    }
384 397
                }

Also available in: Unified diff