sif icon indicating copy to clipboard operation
sif copied to clipboard

Improve Image Compaction Logic

Open tri-adam opened this issue 3 years ago • 0 comments

When OptDeleteCompact is passed to (*FileImage).DeleteObject, an error is thrown if the object being deleted is not last in the SIF image:

https://github.com/sylabs/sif/blob/28ad31be3052905281de6a43bed1e72e9457be0d/pkg/sif/create.go#L502

This makes compaction difficult to use, since the caller needs to be aware of this limitation, and work around it.

We should extend compaction to work regardless of the position of the object being deleted.

tri-adam avatar Mar 28 '22 16:03 tri-adam