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

[VFS] directories in tar file don't have last modified date

    XMLWordPrintableJSON

Details

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

    • 33124

    Description

      The directories in tar files don't have modified date.

      When you try to get the modified date the following exception is thrown:
      org.apache.commons.vfs.FileSystemException: Could not determine the last modifie
      d timestamp of "tgz:http://heanet.dl.sourceforge.net/sourceforge/xins/xins-1.0.1
      .tgz!/xins-1.0.1".
      at
      org.apache.commons.vfs.provider.DefaultFileContent.getLastModifiedTime(DefaultFileContent.java:136)
      at
      org.apache.commons.vfs.example.ShowProperties.main(ShowProperties.java:86)
      Caused by: java.lang.NullPointerException at
      org.apache.commons.vfs.provider.tar.TarFileObject.doGetLastModifiedTime(TarFileObject.java:122)
      at
      org.apache.commons.vfs.provider.DefaultFileContent.getLastModifiedTime(DefaultFileContent.java:132)
      ... 1 more

      How to reproduce this bug:
      in the vfs directory execute
      java -cp
      .;target\commons-vfs-1.0-dev.jar;target\lib\commons-logging-1.0.4.jar;target\lib\commons-compress-20040530.jar
      org.apache.commons.vfs.example.ShowProperties
      tgz:http://heanet.dl.sourceforge.net/sourceforge/xins/xins-1.0.1.tgz!/xins-1.0.1/src/
      (Unix)
      java -cp
      .:target/commons-vfs-1.0-dev.jar:target/lib/commons-logging-1.0.4.jar:target/lib/commons-compress-20040530.jar
      org.apache.commons.vfs.example.ShowProperties
      tgz:http://heanet.dl.sourceforge.net/sourceforge/xins/xins-1.0.1.tgz!/xins-1.0.1/src/
      (Windows)

      This bug prevent for example to copy directories as the exception is thrown when
      copying the first directory.

      If this bug is not in VFS but in commons-compress, you may reassign the bug.

      Attachments

        Activity

          People

            Unassigned Unassigned
            anthony.goubard@wanadoo.nl Anthony Goubard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: