Copy/delete instead of rename files

This commit is contained in:
M66B 2022-10-08 10:45:49 +02:00
parent 36920e7b4c
commit c897b5ccba
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}