Might need to make sure that they both end with \ before comparing, to prevent c:\foobar from looking like it's a child of c:\foo.