Spot image generator creates file with invalid size in database
The file containing the zipped spot images is written correctly to disk, but the size
registered in the database is not same as the actual size on disk. For example, the TestSpotImages program generates a zip-file of 96 846 bytes, but the entry in the database says 96548 bytes. This creates a problem if the zip file is downloaded since the end of it is not transmitted and it can't be opened by another program. Usually it complains about the file not being a valid zip file or it is missing an "end-of-central-directory signature".
See also mail by Chad Matsalla:
http://sourceforge.net/mailarchive/message.php?msg_id=C24EA58C.9D6%25chad.matsalla%40nrc.ca
Change History
(6)
Priority: |
minor → critical
|
Milestone: |
BASE 2.4 → BASE 2.3.1
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Resolution: |
fixed
|
Status: |
closed → reopened
|
Resolution: |
→ fixed
|
Status: |
reopened → closed
|
The problem is in the File class. The File.UploadStream incorrectly tries to override the write(int) method with a write(byte) method. This means that some bytes written to the file are not counted and the file size is too low. Note that the bug doesn't affect the file contents written to the disk.
Updating to critical since the bug may be used to bypass the quota system.