We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ExportFragment
1 parent 890c06c commit 0f4f15dCopy full SHA for 0f4f15d
1 file changed
app-backup/src/main/java/xyz/aprildown/timer/app/backup/ExportFragment.kt
@@ -120,8 +120,10 @@ class ExportFragment : Fragment() {
120
checkNotNull(contentResolver.openOutputStream(uri)).sink()
121
},
122
delete = {
123
- // ContentResolver.delete doesn't work
124
- documentFile?.delete()
+ if (documentFile?.length() == 0L) {
+ // ContentResolver.delete doesn't work
125
+ documentFile.delete()
126
+ }
127
128
),
129
name = documentFile?.name?.takeIf { it.isNotBlank() } ?: uri.toString(),
0 commit comments