Bug 509401 - Create an artifact descriptor for a directory

When creating artifact descriptor in PublisherHelper'
createArtifactDescriptor method, the file denoted by the given path
may be a directory and not a file.

For the directory, java.io.File.length() is unspecified which makes it
pointless to set IArtifactDescriptor.ARTIFACT_SIZE and
IArtifactDescriptor.DOWNLOAD_SIZE.

Also, do not try to calculate checksum for the directory as doing this
will throw exceptions anyway.

Change-Id: I9cf1507a3195790eb3b2f244a3f66ccf125f6f97
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
1 file changed