2 Replies Latest reply on Aug 14, 2010 3:51 PM by rhauch

    Strange VDB archive structure

    rhauch

      I've been looking at the structure of the VDB files, and although they appear to be in standard JAR format, the archive structure doesn't seem right. Here's the archive listing of one recently-created VDB file:

       

      $ jar -tf PartsFromXml.vdb
      META-INF/vdb.xml
      /XmlParts/PartsData.xmi
      runtime-inf/1200573655.INDEX
      /XmlParts/PartsView.xmi
      runtime-inf/1842644986.INDEX

       

      Notice the leading '/' on the model files. Here's what I see when I extract the contents:

       

      $ ls -la

      total 16

      drwxr-xr-x   3 rhauch  rhauch   102B Aug 14 10:34 ./

      drwxr-xr-x  16 rhauch  rhauch   544B Aug 14 10:34 ../

      -rw-r--r--@  1 rhauch  rhauch   5.5K Aug 14 10:34 PartsFromXml.vdb


      $ jar -xvf PartsFromXml.vdb

      inflated: META-INF/vdb.xml

      inflated: /XmlParts/PartsData.xmi

      inflated: runtime-inf/1200573655.INDEX

      inflated: /XmlParts/PartsView.xmi

      inflated: runtime-inf/1842644986.INDEX


      $ ls -la

      total 16

      drwxr-xr-x   5 rhauch  rhauch   170B Aug 14 10:34 ./

      drwxr-xr-x  16 rhauch  rhauch   544B Aug 14 10:34 ../

      drwxr-xr-x   3 rhauch  rhauch   102B Aug 14 10:34 META-INF/

      -rw-r--r--@  1 rhauch  rhauch   5.5K Aug 14 10:34 PartsFromXml.vdb

      drwxr-xr-x   4 rhauch  rhauch   136B Aug 14 10:34 runtime-inf/

      Notice that the models were extracted, but because of the leading '/' they were not extracted to the same location as the other files in the archive. Instead, they were extracted to the root of my file system:
      $ ls -la /XmlParts
      total 24
      drwxr-xr-x   4 rhauch  admin   136 Aug 14 10:34 .
      drwxrwxr-t  35 root    admin  1258 Aug 14 10:34 ..
      -rw-r--r--   1 rhauch  admin  2367 Aug 11 09:27 PartsData.xmi
      -rw-r--r--   1 rhauch  admin  5534 Aug 11 09:27 PartsView.xmi

      This seems to be strange behavior. Is this a bug, or is it intended behavior? If it is intended, can you explain why?

       

      Thanks!