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 6a6dcaacbe795ffa836f25f7738f62884f291310..69b76ddc641f859bafb0ca2083b7ab9ccc5b1805 100644 (file)
@@ -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;