mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Merge pull request #7993 from nextcloud/noAvatars
user search: when reusing temp file, we first need to delete it
This commit is contained in:
commit
ce4a8159b6
1 changed files with 5 additions and 0 deletions
|
@ -406,6 +406,11 @@ public class UsersAndGroupsSearchProvider extends ContentProvider {
|
|||
// create a file to write bitmap data
|
||||
File f = new File(getContext().getCacheDir(), "test");
|
||||
try {
|
||||
if (f.exists()) {
|
||||
if (!f.delete()) {
|
||||
throw new IllegalStateException("Existing file could not be deleted!");
|
||||
}
|
||||
}
|
||||
if (!f.createNewFile()) {
|
||||
throw new IllegalStateException("File could not be created!");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue