* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.DirectoryServices / System.DirectoryServices / DirectoryEntries.cs
index d773e1d90d15bb3eec3667808e8fa7cb84078655..89cb0579359850e1288ad31c2e7cbcf7aed1d047 100644 (file)
@@ -190,7 +190,8 @@ namespace System.DirectoryServices
                {
                        DirectoryEntry ent=new DirectoryEntry(Conn);
                        LdapUrl Burl=new LdapUrl(_Bpath);
-                       string eFdn=name+","+Burl.getDN();
+                       string baseDn = Burl.getDN();
+                       string eFdn=((baseDn != null && baseDn.Length != 0) ? (name + "," + baseDn) : name);
                        LdapUrl curl=new LdapUrl(Burl.Host,Burl.Port,eFdn);
                        ent.Path=curl.ToString();
                        ent.Nflag = true;