mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
fix: Properly surround filename in quotation marks
Signed-off-by: Myzel394 <50424412+Myzel394@users.noreply.github.com>
This commit is contained in:
parent
8cd2fa3b76
commit
73e99afadc
@ -419,11 +419,25 @@ abstract class BatchesFolder(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context.contentResolver.delete(
|
try {
|
||||||
scopedMediaContentUri,
|
context.contentResolver.delete(
|
||||||
"${MediaStore.MediaColumns.DISPLAY_NAME} IN (${deletableNames.joinToString(",")})",
|
scopedMediaContentUri,
|
||||||
null,
|
"${MediaStore.MediaColumns.DISPLAY_NAME} IN (${
|
||||||
)
|
deletableNames.joinToString(
|
||||||
|
","
|
||||||
|
) { "'$it'" }
|
||||||
|
})",
|
||||||
|
null,
|
||||||
|
)
|
||||||
|
// This is unfortunate if the files can't be deleted, but let's just
|
||||||
|
// ignore it since we can't do anything about it
|
||||||
|
} catch (e: RuntimeException) {
|
||||||
|
// Probably file not found
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: IllegalArgumentException) {
|
||||||
|
// Strange filename, should not happen
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// TODO: Fix "would you like to try saving" -> Save button
|
// TODO: Fix "would you like to try saving" -> Save button
|
||||||
legacyMediaFolder.listFiles()?.forEach {
|
legacyMediaFolder.listFiles()?.forEach {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user