Revision 268bec7f trunk/Pithos.Core/LocalFileComparer.cs

b/trunk/Pithos.Core/LocalFileComparer.cs
24 24
                if (!x.CloudFile.Hash.Equals(y.CloudFile.Hash))
25 25
                    return false;
26 26
                //All directories have the same hash. Compare them using their names instead
27
                if (x.CloudFile.Content_Type == y.CloudFile.Content_Type && x.CloudFile.Content_Type == "application/directory")
27
                if (x.CloudFile.Content_Type == y.CloudFile.Content_Type && x.CloudFile.IsDirectory)
28 28
                {
29 29
                    return (x.CloudFile.Name == y.CloudFile.Name);
30 30
                }
......
44 44
            if (obj.CloudFile != null)
45 45
            {
46 46
                //All directories have the same hash code. Use their name's hash code instead
47
                hash2 = obj.CloudFile.Content_Type == "application/directory" 
47
                hash2 = obj.CloudFile.IsDirectory 
48 48
                            ? obj.CloudFile.Name.GetHashCode() 
49 49
                            : (obj.CloudFile.Hash ?? obj.CloudFile.Name ?? "").GetHashCode();
50 50
            }

Also available in: Unified diff