Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-884

URLRepository does not allow some valid file scheme uri's

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-beta-1
    • 2.0-RC1
    • Core
    • None

    Description

      We hit an interesting problem when we set a valid uri in a URL resolver, but the URLRepository could not list the repository.

      The problem was the uri was a file: scheme and the path had a space in it. The toString method for URI will escape the space and replace them with %20. URI.getPath will decode the %20 back into a space for listing, but URL.getPath will not.

      URLRepository has support for the file: scheme, but uses URL to get the path ( new URL(parent).getPath() ) instead of URI.

      Here is the fix we are using in list.

      } else if (parent.startsWith("file")) {
      try {
      String path = new URI(parent).getPath();

      This is probably not a common problem because it requires a URL resolver with a URI using the file: scheme and a character that needs to be escaped, like a space

      I looked at the current source and this is still an issue. We hit the issue with beta-1 and currently stepping up to beta-2.

      Attachments

        Activity

          People

            maartenc Maarten Coene
            bonanno Jim Bonanno
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: