openmicroscopy/openmicroscopy — pull request #3194 by manics (2014-11-17 17:40:48+00:00)
Title: Tables metadata check size after close

This should fix the corruption in https://trac.openmicroscopy.org.uk/ome/ticket/12606
(Note it doesn't fix `tables.setAllMetadata`)

Previously the file size was being checked before `hdffile.close()` (via `cleanup()`) had been called. `hdffile.flush()` is already called after any modification but this doesn't seem to be enough. As a result `TableI.close()` was sometimes [truncating the file](https://github.com/openmicroscopy/openmicroscopy/blob/9603945360d3c4af0d04f566f6b498e0afbff394/components/tools/OmeroPy/src/omero/tables.py#L663)