mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-13 06:38:05 -05:00
Actually, clearing the tempdir from attachmentprovider stomps on our
binary download usage of the temp directory. Reverted!
This commit is contained in:
parent
7649c598a9
commit
7de3aeb740
@ -65,7 +65,19 @@ public class AttachmentProvider extends ContentProvider
|
|||||||
@Override
|
@Override
|
||||||
public boolean onCreate()
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user