1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Actually, clearing the tempdir from attachmentprovider stomps on our

binary download usage of the temp directory. Reverted!
This commit is contained in:
Jesse Vincent 2010-07-19 05:32:37 +00:00
parent 7649c598a9
commit 7de3aeb740

View File

@ -65,7 +65,19 @@ public class AttachmentProvider extends ContentProvider
@Override
public boolean onCreate()
{
clear(getContext());
/*
* We use the cache dir as a temporary directory (since Android doesn't give us one) so
* on startup we'll clean up any .tmp files from the last run.
*/
File[] files = getContext().getCacheDir().listFiles();
for (File file : files)
{
if (file.getName().endsWith(".tmp"))
{
file.delete();
}
}
return true;
}