Skip to content

Commit

Permalink
[Fix] Don't launch open intent if copy failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghai committed Sep 16, 2023
1 parent 5eeb8c6 commit 892229c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,10 @@ private fun FileJob.open(
val targetFile = cacheDirectory.resolveForeign(targetFileName)
val transferInfo = TransferInfo(scanInfo, cacheDirectory)
val actionAllInfo = ActionAllInfo(replace = true)
copy(file, targetFile, isExtract, transferInfo, actionAllInfo)
val copied = copy(file, targetFile, isExtract, transferInfo, actionAllInfo)
if (!copied) {
return
}
BackgroundActivityStarter.startActivity(
intentCreator(targetFile), getString(notificationTitleFormatRes, targetFileName),
getString(notificationTextRes), service
Expand Down

0 comments on commit 892229c

Please sign in to comment.