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

File name parsing issues in layered file systems

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 2.7.0
    • None
    • Windows XP SP2 - but also assuming in other environments

    Description

      The "!" character is used as delimiter for e.g. ZIP file access as VFS component.

      When trying to traverse a layered file, e.g. traversing a ZIP content and the ZIP contains a file with a "Unable to render embedded object: File (" in the file name itself then a FileSystemException appears - it seems that the parsing routine for layered filenames is stumbling over the ") not found." character.

      Exception trace for a test VFS component:
      org.apache.commons.vfs.FileSystemException: Incorrect file system URI "syncdb:file:///C:/Temp/test.xml!/c/temp/Maps/Important to Read!!/" in name "syncdb:file:///C:/Temp/test.xml!/c/temp/Maps/Important to Read!!.txt", was expecting "syncdb:file:///C:/Temp/test.xml!/".
      at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:274)
      at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:267)
      at org.apache.commons.vfs.provider.AbstractFileObject.resolveFile(AbstractFileObject.java:670)
      at de.jensscheffler.ftpsync.db.SyncFileSystemTest.treeCopy(SyncFileSystemTest.java:87)
      (...)

      As the accessing code was just traversing a folder tree with no chance to handle this, is there any alternative for traversing through these layered file systems when the content contains special characters?

      Maybe the approach for parsing needs to be enhanced also, I could offer some help but maybe need a hint to contribute a fix.

      Attachments

        1. LayeredFileNameParsingTest.java
          3 kB
          Jens Scheffler

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jscheffl Jens Scheffler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: