Revision 5bcf6d70 trunk/Pithos.Core/StatusChecker.cs
b/trunk/Pithos.Core/StatusChecker.cs | ||
---|---|---|
1 | 1 |
using System; |
2 | 2 |
using System.Collections.Generic; |
3 | 3 |
using System.ComponentModel.Composition; |
4 |
using System.Diagnostics; |
|
4 | 5 |
using System.Diagnostics.Contracts; |
5 | 6 |
using System.IO; |
6 | 7 |
using Castle.ActiveRecord; |
... | ... | |
28 | 29 |
|
29 | 30 |
public FileOverlayStatus GetFileOverlayStatus(string path) |
30 | 31 |
{ |
31 |
var state=FileState.TryFind(path); |
|
32 |
return state==null ? FileOverlayStatus.NA : state.OverlayStatus; |
|
32 |
try |
|
33 |
{ |
|
34 |
var state = FileState.TryFind(path); |
|
35 |
return state == null ? FileOverlayStatus.NA : state.OverlayStatus; |
|
36 |
} |
|
37 |
catch (Exception exc) |
|
38 |
{ |
|
39 |
Trace.TraceError(exc.ToString()); |
|
40 |
return FileOverlayStatus.NA; |
|
41 |
} |
|
42 |
} |
|
43 |
|
|
44 |
|
|
45 |
private PithosStatus _pithosStatus=PithosStatus.InSynch; |
|
46 |
public void SetPithosStatus(PithosStatus status) |
|
47 |
{ |
|
48 |
_pithosStatus = status; |
|
33 | 49 |
} |
34 | 50 |
|
35 | 51 |
public PithosStatus GetPithosStatus() |
36 | 52 |
{ |
37 |
return PithosStatus.InSynch;
|
|
53 |
return _pithosStatus;
|
|
38 | 54 |
} |
39 | 55 |
|
40 | 56 |
public void SetFileOverlayStatus(string path, FileOverlayStatus overlayStatus) |
Also available in: Unified diff