code: protected void checkNotSubPath(String source, String target) {
  
          source = CmsStringUtil.joinPaths("/", source, "/");
          target = CmsStringUtil.joinPaths("/", target, "/");
          if (target.startsWith(source)) {
              throw new CmsIllegalArgumentException(
                  org.opencms.file.Messages.get().container(
                      org.opencms.file.Messages.ERR_REWRITE_LINKS_ROOTS_DEPENDENT_2,
                      source,
                      target));
          }
      }
docs: Checks that the target path is not a subfolder of the source path.<p>
  
  @param source the source path
  @param target the target path