Commits

Sergey Antonov committed 29f5b1d

Fixed a bug with type convertion when adding a WinJS project to source control in VS2012

Comments (0)

Files changed (1)

HgSccPackage/SccProvider.cs

 					DebugWalkingNode(pHier, childnode);
 
 					if (
-						(pHier.GetProperty(childnode, (int) __VSHPROPID.VSHPROPID_Expandable,
-										   out property) == VSConstants.S_OK &&
-						 (int) property != 0) ||
-						(pHier.GetProperty(childnode, (int) __VSHPROPID2.VSHPROPID_Container,
-										   out property) == VSConstants.S_OK && (bool) property))
+						    (   pHier.GetProperty(childnode, (int) __VSHPROPID.VSHPROPID_Expandable, out property) == VSConstants.S_OK
+                            &&  Convert.ToBoolean(property)
+                            )
+                         ||
+                            (  pHier.GetProperty(childnode, (int) __VSHPROPID2.VSHPROPID_Container, out property) == VSConstants.S_OK
+                            && Convert.ToBoolean(property)
+                            )
+                        )
 					{
 						nodesToWalk.Enqueue(childnode);
 					}
 
 						DebugWalkingNode(pHier, childnode);
 
-						if (
-							(pHier.GetProperty(childnode, (int) __VSHPROPID.VSHPROPID_Expandable,
-											   out property) == VSConstants.S_OK &&
-							 (int) property != 0) ||
-							(pHier.GetProperty(childnode, (int) __VSHPROPID2.VSHPROPID_Container,
-											   out property) == VSConstants.S_OK && (bool) property))
+						if (    (   pHier.GetProperty(childnode, (int) __VSHPROPID.VSHPROPID_Expandable, out property) == VSConstants.S_OK
+                                &&  Convert.ToBoolean(property)
+                                )
+                            ||  (   pHier.GetProperty(childnode, (int) __VSHPROPID2.VSHPROPID_Container, out property) == VSConstants.S_OK
+                                &&  Convert.ToBoolean(property)
+                                )
+                            )
 						{
 							nodesToWalk.Enqueue(childnode);
 						}