Fix URI when using default LDIF
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / kernel / NodeUserAdmin.java
index d6d721f6dcc9e33c84a765566b6e128760870e92..2c6fe7de00ac60a618cf38eab1ef966d8f2ff46d 100644 (file)
@@ -290,10 +290,11 @@ public class NodeUserAdmin implements UserAdmin, KernelConstants {
                                        if (uri.startsWith("/") || uri.startsWith("./")
                                                        || uri.startsWith("../"))
                                                u = new File(uri).getCanonicalFile().toURI();
-                                       else if (!uri.contains("/"))
-                                               u = new File(nodeBaseDir, uri).getCanonicalFile()
-                                                               .toURI();
-                                       else
+                                       else if (!uri.contains("/")) {
+                                               u = new URI(nodeBaseDir.toURI()+ uri);
+                                               // u = new File(nodeBaseDir, uri).getCanonicalFile()
+                                               // .toURI();
+                                       } else
                                                throw new CmsException("Cannot interpret " + uri
                                                                + " as an uri");
                                } else if (u.getScheme().equals("file")) {