On 31/03/2009, Stefan Bodewig <bode...@apache.org> wrote:
> On 2009-03-31, <s...@apache.org> wrote:
>
>  > URL: http://svn.apache.org/viewvc?rev=760390&view=rev
>  > Log:
>  > Set some attributes from the File
>
>
> >      public ZipArchiveEntry(File inputFile, String entryName) {
>  >          this(entryName);
>  >+         setSize(inputFile.length());
>  >+         setTime(inputFile.lastModified());
>  >          // TODO are there any other fields we can set here?
>  >      }
>
>
> setSize is dangerous here since it may very well > 0 for directories
>  on Unix like systems.

Oops!

However it should be OK for regular files, no?

I think we need some test cases which check the behaviour with directories ...

>  Stefan
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>  For additional commands, e-mail: dev-h...@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to