Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-35

[VFS] URI of LocalFile contains second slash after scheme

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Nightly Builds
    • None
    • None
    • Operating System: Windows XP
      Platform: PC

    • 35848

    Description

      Hello,

      the code

      FileSystemManager fsManager = VFS.getManager();
      FileObject file = fsManager.resolveFile("D:/test.txt");
      System.out.println("VFS: " + file.getName().getURI());

      File ioFile = new File("D:/test.txt");
      System.out.println("IO: " + ioFile.toURI());

      prints

      VFS: file://D:/test.txt
      IO: file:/D:/test.txt

      Note the second slash in first URI.

      If you replace

      buffer.append("://")

      in LocalFileName.appendRootUri(StringBuffer) with

      buffer.append(":/");

      the URI is correct. But I have no idea about some side effects.

      Please check that.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--35848.txt
          0.6 kB
          Martin Burger

        Activity

          People

            Unassigned Unassigned
            m@rtin-burger.de Martin Burger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: