]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.cms/src/org/argeo/cms/acr/MountManager.java
Make CMS running without data area, and remove unnecessary dependencies.
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / acr / MountManager.java
index 3995dc30fcc84c1f32a55f435d94f6cbb0dd280f..69b76ddc641f859bafb0ca2083b7ab9ccc5b1805 100644 (file)
@@ -31,7 +31,7 @@ class MountManager {
                String[] parentPath = ContentUtils.getParentPath(mountPath);
                Content parent = systemSession.get(parentPath[0]);
                Content mount = parent.add(parentPath[1]);
-               mount.put(CrName.MOUNT.get(), "true");
+               mount.put(CrName.mount.qName(), "true");
 
        }
 
@@ -52,6 +52,8 @@ class MountManager {
                if (entry == null)
                        throw new IllegalArgumentException("No entry provider found for " + path);
                String mountPath = entry.getKey();
+               if (!path.startsWith(mountPath))
+                       throw new IllegalArgumentException("Path " + path + " doesn't have a content provider");
                ContentProvider contentProvider = entry.getValue();
                assert mountPath.equals(contentProvider.getMountPath());
                return contentProvider;