Skip to content

Commit

Permalink
fix: intermittent issues with saving files to downloads dir
Browse files Browse the repository at this point in the history
Signed-off-by: Next Alone <[email protected]>
  • Loading branch information
NextAlone committed Oct 26, 2024
1 parent d703afa commit f3f949e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4529,6 +4529,10 @@ SaveToDownloadReceiver. makeNotification(context,notificationId,messageObjects.s
sourceFile = FileLoader.getInstance(currentAccount.getCurrentAccount()).getPathToAttach(message.messageOwner, true);
FileLog.d("saving file: correcting path from " + path + " to " + (sourceFile == null ? null : sourceFile.getAbsolutePath()));
}
if (sourceFile != null && !sourceFile.exists()) {
sourceFile = FileLoader.getInstance(currentAccount.getCurrentAccount()).getPathToAttach(message.messageOwner, false);
FileLog.d("saving file: correcting path without cache from " + path + " to " + (sourceFile == null ? null : sourceFile.getAbsolutePath()));
}
if (sourceFile != null && sourceFile.exists()) {
saveFileInternal(isMusic ? 3 : 2, sourceFile, name);
copiedFiles++;
Expand Down

0 comments on commit f3f949e

Please sign in to comment.