Leaks temp files when resizing

Bug #1053528 reported by James Westby
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkgme-devportal
Triaged
High
Unassigned

Bug Description

When an icon has to be resized it is done with a NamedTemporaryFile(..., delete=False),
but the file is never cleaned up.

This leads to disks on production slowly filling up with icons.

In metadata.py _ensure_required_icon_size does

        new_path = convert_icon(icons[best_resolution], required_size)
        icons[required_size] = new_path

and that's the last reference to the icon.

The issues is that we're returning the paths to pkgme, but there's no way to
clean them up afterwards. This will probably require an extension to the interface.

Thanks,

James

James Westby (james-w)
tags: added: canonical-losa-ca
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.