Cook-E-team / Cook-E

A mobile application that helps schedule cooking with multiple recipes
GNU General Public License v3.0
2 stars 1 forks source link

Recipe images are not cleaned up when recipes are deleted #34

Closed samcrow closed 8 years ago

samcrow commented 8 years ago

The current technique for storing recipes calculates a file name from the CRC-32 checksum of the compressed image data and stores the image on the file system. However, there is no way to delete image files when recipes are deleted. This problem could eventually use up all the storage on a device.

The paths to images are stored in the recipe table, so finding and deleting image files that are not used by any recipes would be easy. Someone could set up an asynchronous task to do this regularly, maybe every time the home activity is created.

kylewoo235 commented 8 years ago

We have changed how the file names are calculated such that they are guranteed not to be shared.