mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-15 08:29:24 +00:00
Copy/delete instead of rename files
This commit is contained in:
parent
36920e7b4c
commit
c897b5ccba
1 changed files with 2 additions and 2 deletions
|
@ -592,8 +592,8 @@ public class EntityMessage implements Serializable {
|
|||
try {
|
||||
long id = Long.parseLong(file.getName());
|
||||
File target = getFile(context, id);
|
||||
if (!file.renameTo(target))
|
||||
throw new IllegalArgumentException("Failed renaming to " + target);
|
||||
Helper.copy(file, target);
|
||||
file.delete();
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue